https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110617
--- Comment #10 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Florian Weimer from comment #9) > (In reply to Xi Ruoyao from comment #6) > > (In reply to Richard Biener from comment #5) > > > I think a -f... option to disable the code generation effects would make > > > more sense than adding another attribute kind. > > > > Then maybe we'd just add a -D_GLIBC_NONNULL={0,1} (?) into Glibc cdefs.h > > instead. Anyway I'm already too frustrated about this so I'll not continue > > working on nonnull within Glibc headers. If you don't like this just close > > it as WONTFIX. > > For those who are not following libc-alpha, glibc already disables __nonnull > during its build, so it should be totally fine to use __nonnull in installed > headers to improve diagnostics. But Zack's reason against using __nonnull is __nonnull may cause unwanted optimizations to *the user code*.