This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/47931] missing -Waddress warning for comparison with NULL


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]