This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Aug 2016 17:44:50 +0000
- Subject: [Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77298-4@http.gcc.gnu.org/bugzilla/>
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.