zig
zig copied to clipboard
langref: clarification about optionals optimization
In the https://ziglang.org/documentation/master/#Optionals, the documentation says:
"One benefit to this is that functions which take pointers as arguments can be annotated with the "nonnull" attribute - attribute((nonnull)) in GCC. The optimizer can sometimes make better decisions knowing that pointer arguments cannot be null."
This text does not seems very useful. Moreover the text seems to imply that the Zig compiler generates C code compiled with GCC (note that the text was committed in 2017-11-07).