This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/40564] New: Invalid -Wc++-compat warning about stringized C++ operator name


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]