This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Sep 2016 19:18:34 +0000
- Subject: [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
- Auto-submitted: auto-generated
- References: <bug-77513-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77513
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to petschy from comment #2)
> Here I see the same flags, yet for these two NULLs gcc warns.
prog.cc:6:28: warning: zero as null pointer constant
[-Wzero-as-null-pointer-constant]
, false, false };
^
because the location given is wrong, so the location in this case is not within
the system-header flags. If the location was right (under __null), it would not
warn. That is the bug.