zig icon indicating copy to clipboard operation
zig copied to clipboard

langref: clarification about optionals optimization

Open perillo opened this issue 3 years ago • 0 comments

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).

perillo avatar Dec 13 '22 11:12 perillo