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

2017-01-04 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 --- Comment #11 from Eric Gallager --- Thank you for adding this!

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

2017-01-04 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

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

2017-01-04 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 --- Comment #9 from Marek Polacek --- Author: mpolacek Date: Wed Jan 4 21:47:04 2017 New Revision: 244076 URL: https://gcc.gnu.org/viewcvs?rev=244076=gcc=rev Log: PR c++/64767 * c.opt (Wpointer-compare): New option. *

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

2016-12-07 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 Eric Gallager changed: What|Removed |Added CC||egall at gwmail dot gwu.edu --- Comment

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

2016-10-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 --- Comment #7 from Marek Polacek --- This code is now rejected in C++11. See r240707.

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

2016-09-08 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED CC|

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

2016-08-31 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org ---

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

2015-01-24 Thread ulfalizer at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 --- Comment #2 from Ulf Magnusson ulfalizer at gmail dot com --- Looks like -Wnon-literal-null-conversion is intended to warn for the comparison case too, though it doesn't seem to be implemented yet as of clang 3.4:

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

2015-01-24 Thread ulfalizer at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 --- Comment #3 from Ulf Magnusson ulfalizer at gmail dot com --- clang also generates a warning for C programs with void *a = '\0' by the way, so it seems to be able to look at the form of the integral constant there.

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

2015-01-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 --- Comment #4 from Jonathan Wakely redi at gcc dot gnu.org --- Yes, although C says '\0' has type int the compiler can still distinguish the token '\0' from 0 during compilation.

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

2015-01-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last