This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/7776] const char* p = "foo"; if (p == "foo") ... is compiled without warning!
- From: "udbz at rz dot uni-karlsruhe dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2003 18:43:24 -0000
- Subject: [Bug c/7776] const char* p = "foo"; if (p == "foo") ... is compiled without warning!
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7776
------- Additional Comments From udbz@rz.uni-karlsruhe.de 2003-05-24 18:43 -------
Subject: Re: [Bug c/7776] const char* p = "foo"; if (p == "foo") ... is
compiled without warning!
Hi,
On 24 May 2003, pinskia@physics.uc.edu wrote:
> ------- Additional Comments From pinskia@physics.uc.edu 2003-05-24 14:08 -------
> confirmed on mainline (20030524).
> Should there be a warning on comparing a char* to string constant,
> suggesting strcmp?
Yes, that was the idea.
Greetings,
Peter
---
Peter Schlaile *** eMail udbz@rz.uni-karlsruhe.de
So Linus, what are we doing tonight?
The same thing we do every night Tux. Try to take over the world!
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.