[Bug c++/57620] New: Phantom terminator confuses raw string literal parsing.
crowl at google dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 14 22:21:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57620
Bug ID: 57620
Summary: Phantom terminator confuses raw string literal
parsing.
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: crowl at google dot com
The first example of C++11 section 2.14.5 paragraph 5 confuses the scanner.
$ cat test.cc
const char *phantom_terminator = R"a(
)\
a"
)a";
$ xg++ -std=c++11 -g -O2 -c test.cc
test.cc:4:3: warning: missing terminating " character [enabled by default]
)a";
^
test.cc:4:1: error: missing terminating " character
)a";
^
test.cc:4:1: error: expected ',' or ';' before ')' token
More information about the Gcc-bugs
mailing list