This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/40564] New: Invalid -Wc++-compat warning about stringized C++ operator name
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2009 21:09:07 -0000
- Subject: [Bug c/40564] New: Invalid -Wc++-compat warning about stringized C++ operator name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code is valid C++:
#define S(a) #a
const char* s = S(and);
However, the C frontend gives a warning with -Wc++-compat:
foo.c:2:19: warning: identifier "and" is a special operator name in C++
This warning should not be given if the preprocessor token is simply
stringified.
--
Summary: Invalid -Wc++-compat warning about stringized C++
operator name
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40564