[Bug c++/64767] Could GCC warn when a pointer is compared against '\0'?

egall at gwmail dot gwu.edu gcc-bugzilla@gcc.gnu.org
Wed Dec 7 16:11:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767

Eric Gallager <egall at gwmail dot gwu.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egall at gwmail dot gwu.edu

--- Comment #8 from Eric Gallager <egall at gwmail dot gwu.edu> ---
(In reply to Marek Polacek from comment #7)
> This code is now rejected in C++11.  See r240707.

What about in other standards? gcc built at the end of November still seems to
reject the -Wpointer-compare flag that I thought was going to be added for
this:

$ /usr/local/bin/gcc -Wpointer-compare randomer.c
gcc: error: unrecognized command line option ‘-Wpointer-compare’; did you mean
‘-Wnonnull-compare’?


More information about the Gcc-bugs mailing list