[Bug preprocessor/57580] New: Repeated _Pragma message directives in macro causes problems
drussel at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 10 19:19:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list