-
Notifications
You must be signed in to change notification settings - Fork 52
Uninitialized access succeeds #13
Comments
maybe i'm not sure what a good semantic for uninitialized values is. should zz simply always emit initialization into the C code? (consistent with rust) it currently does the last one, so using the value in other assertions will fail, but reading it is fine. |
I guess most C programmers would probably expect the second option. Most C compilers will emit a warning when accessing an unitialized value. I would expect the output to compile without warnings. |
right, that's a really good basis for these decisions. |
ok then more decisions to be made.
|
Sounds like the decision should be a flag. :) I would vote that #2 be the default since it's "safer", with a flag to handle the first case if wanted? |
Shouldn't this fail?
https://github.com/aep/zz/blob/5662bdc311d8dd54585a3f43a580eb6d25d516fc/tests/mustpass/branch_dont_loose_deref/src/main.zz#L19
The text was updated successfully, but these errors were encountered: