Variables
Zero init by default
Unlike C, C3 local variables are zero-initialized by default. To avoid zero initialization, you need to explicitly opt-out.
int x; // x = 0int y @noinit; // y is explicitly undefined and must be assigned before use.
AStruct foo; // foo is implicitly zeroedAStruct bar = {}; // bar is explicitly zeroedAStruct baz @noinit; // baz is explicitly undefined
Using a variable that is explicitly undefined before will trap or be initialized to a specific value when compiling “safe” and is undefined behaviour in “fast” builds.