[Bug c++/53165] New: multiline raw strings as macro arguments
joerg.richter@pdv-fs.de
gcc-bugzilla@gcc.gnu.org
Mon Apr 30 09:58:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53165
Bug #: 53165
Summary: multiline raw strings as macro arguments
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: joerg.richter@pdv-fs.de
With GCC 4.7.0:
$ cat t.cc
#define XXX( x ) x
char const* str = XXX( R"(
)" );
$ g++ -std=c++0x -o t t.cc
t.cc:2:24: error: unterminated raw string
t.cc:2:1: error: stray 'R' in program
t.cc:3:2: warning: missing terminating " character [enabled by default]
t.cc:2:1: error: missing terminating " character
t.cc:2:17: error: expected primary-expression at end of input
t.cc:2:17: error: expected ',' or ';' at end of input
Following raw string works:
char const* str = XXX( R"()" );
More information about the Gcc-bugs
mailing list