This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/57580] New: Repeated _Pragma message directives in macro causes problems
- From: "drussel at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Jun 2013 19:19:42 +0000
- Subject: [Bug preprocessor/57580] New: Repeated _Pragma message directives in macro causes problems
- Auto-submitted: auto-generated
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.