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 preprocessor/57580] New: Repeated _Pragma message directives in macro causes problems


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

            Bug ID: 57580
           Summary: Repeated _Pragma message directives in macro causes
                    problems
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: drussel at gmail dot com

Input:
#define BROKEN                        \
  _Pragma("message(\"message0\")")               \
  _Pragma("message(\"message1\")")

BROKEN


Output:
gcc -c test.cpp
test.cpp:5:2: error: stray â#â in program
test.cpp:5:27: note: #pragma message: message0
test.cpp:5:3: error: âpragmaâ does not name a type

gcc 4.6.3 and clang are both happy with the code.

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