[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 19 16:50:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You can always use -fkeep-inline-functions to get the warning even for unused
inlines (by forcing them to be emitted). -Wnonnull-compare isn't the only
warning that isn't performed in the FEs early, think about -Wuninitialized and
-Wmaybe-uninitialized and many others.  Those have the same behavior here.


More information about the Gcc-bugs mailing list