You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I rename it as per rust conventions, so the compiler doesn't complain.
a_plus_b_1.rs
And when I try to compile it with rustc , I run into the following error
❯ rustc a_plus_b_1.rs
error[E0446]: private type `__sFILEX` in public interface
--> a_plus_b_1.rs:37:5
|
37 | pub _extra : *mut __sFILEX,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
error: aborting due to previous error
Then I remove/comment/modify the line 37 and the errors are related to usage of variable, which are to be read through stdin
❯ rustc a_plus_b_1.rs
error[E0381]: use of possibly uninitialized variable: `a`
--> a_plus_b_1.rs:85:14
|
85 |&mut a as (*mut i32),
| ^ use of possibly uninitialized `a`
error[E0381]: use of possibly uninitialized variable: `b`
--> a_plus_b_1.rs:86:14
|
86 |&mut b as (*mut i32)
| ^ use of possibly uninitialized `b`
error[E0381]: use of possibly uninitialized variable: `a`
--> a_plus_b_1.rs:88:34
|
88 | printf((*b"%d\n\0").as_ptr(),a + b); | ^ use of possibly uninitialized `a`error[E0381]: use of possibly uninitialized variable: `b` --> a_plus_b_1.rs:88:38 |88 | printf((*b"%d\n\0").as_ptr(),a + b); | ^ use of possibly uninitialized `b`error: aborting due to 4 previous errors
The text was updated successfully, but these errors were encountered:
The specific problems that I outlined here might not be that important, I can understand, but the point is RosettaCode could essentially prove to be a great resource for iterating on Corrode. Here's a repository using which you can isolate all the tasks done in C
Hi again @jameysharp
Have you thought about using Corrode on small-ish
C
code?I was experimenting with the
C
language tasks fromRosettaCode
but the errors I keep running into are sort of recurrent.Let's take this for example
a+b-1.c
After running corrode I get two files
Only the first one is saved.
I rename it as per rust conventions, so the compiler doesn't complain.
a_plus_b_1.rs
And when I try to compile it with
rustc
, I run into the following errorThen I remove/comment/modify the
line 37
and the errors are related to usage of variable, which are to be read throughstdin
The text was updated successfully, but these errors were encountered: