This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/86210] [6/7/8/9 Regression] Missing -Wnonnull warning for function defined in the same TU
- 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: Wed, 20 Jun 2018 09:48:28 +0000
- Subject: [Bug c++/86210] [6/7/8/9 Regression] Missing -Wnonnull warning for function defined in the same TU
- Auto-submitted: auto-generated
- References: <bug-86210-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86210
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For C we've started warning for the declared_not_defined function with r243661,
because the warning is done during expansion, if you inline the call, then no
warning is emitted. Perhaps we could also warn during inlining if we inline
and pass integer_zerop to a nonnull argument of the inline function. It
wouldn't warn if something isn't simplified into the constant yet (especially a
problem during early inlining), but perhaps better than nothing.