This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47931] missing -Waddress warning for comparison with 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: Tue, 1 Mar 2011 09:05:23 +0000
- Subject: [Bug c/47931] missing -Waddress warning for comparison with NULL
- Auto-submitted: auto-generated
- References: <bug-47931-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47931
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #2 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2011-03-01 09:05:13 UTC ---
PR 36299 asks to not warn for (&a == 0). Ideally, we should allow users to
workaround the warning by using a pointer cast on the variable but warn for
(void *)0. I think this would be a reasonable middle-ground.
But at the end, someone has to dig in the code and implement whatever he can.
This part of the C FE is not very pretty.