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.

Reply via email to