This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64767] Could GCC warn when a pointer is compared against '\0'?
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 24 Jan 2015 15:59:28 +0000
- Subject: [Bug c++/64767] Could GCC warn when a pointer is compared against '\0'?
- Auto-submitted: auto-generated
- References: <bug-64767-4 at http dot gcc dot gnu dot org/bugzilla/>
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.