[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 17:44:00 GMT 2016


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Different warnings are simply done at different compilation phases.  This is
similar to how you get only a subset of FE warnings on uninstantiated
templates, only something can be warned reliably at that phase, and something
is just too hard to warn at that phase.  So, lots of warnings you get only when
actually instantiating the templates.


More information about the Gcc-bugs mailing list