This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/78914] missing -Wnonnull for a trivial null pointer dereference
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Jan 2017 04:02:44 +0000
- Subject: [Bug middle-end/78914] missing -Wnonnull for a trivial null pointer dereference
- Auto-submitted: auto-generated
- References: <bug-78914-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78914
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
As it turns out, the test case in comment #0 is diagnosed when the
-Wnull-dereference option is explicitly specified. Unfortunately,
-Wnull-dereference isn't enabled by either -Wall or -Wextra and must be
enabled explicitly. This seems to have been changed in r226751 prior to which
-Wnull-dereference was in -Wall. The -Wnull-dereference option was added in
response to bug 16351 and enabled in -Wall, but based on the discussion in the
bug it looks like it led to some false positives and so it was subsequently
yanked out of -Wall. So with that I think this bug can be closed as a
duplicate of bug 16351 (which is still open).
*** This bug has been marked as a duplicate of bug 16351 ***