Commit 8787a05a by Jason Merrill Committed by Jason Merrill

re PR c++/45399 ([C++0x] Warning for \0 in raw strings)

	PR c++/45399
	* lex.c (lex_raw_string): Don't check for embedded NUL.

From-SVN: r175121
parent 42db600d
2011-06-16 Jason Merrill <jason@redhat.com> 2011-06-16 Jason Merrill <jason@redhat.com>
PR c++/45399
* c-c++-common/raw-string-12.c: New.
PR c++/49229 PR c++/49229
* g++.dg/cpp0x/sfinae26.C: New. * g++.dg/cpp0x/sfinae26.C: New.
......
2011-06-16 Jason Merrill <jason@redhat.com>
PR c++/45399
* lex.c (lex_raw_string): Don't check for embedded NUL.
2011-06-06 Dodji Seketeli <dodji@redhat.com> 2011-06-06 Dodji Seketeli <dodji@redhat.com>
PR preprocessor/48532 PR preprocessor/48532
......
...@@ -1270,7 +1270,6 @@ static void ...@@ -1270,7 +1270,6 @@ static void
lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base, lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
const uchar *cur) const uchar *cur)
{ {
source_location saw_NUL = 0;
const uchar *raw_prefix; const uchar *raw_prefix;
unsigned int raw_prefix_len = 0; unsigned int raw_prefix_len = 0;
enum cpp_ttype type; enum cpp_ttype type;
...@@ -1476,16 +1475,9 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base, ...@@ -1476,16 +1475,9 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
cur = base = pfile->buffer->cur; cur = base = pfile->buffer->cur;
note = &pfile->buffer->notes[pfile->buffer->cur_note]; note = &pfile->buffer->notes[pfile->buffer->cur_note];
} }
else if (c == '\0' && !saw_NUL)
LINEMAP_POSITION_FOR_COLUMN (saw_NUL, pfile->line_table,
CPP_BUF_COLUMN (pfile->buffer, cur));
} }
break_outer_loop: break_outer_loop:
if (saw_NUL && !pfile->state.skipping)
cpp_error_with_line (pfile, CPP_DL_WARNING, saw_NUL, 0,
"null character(s) preserved in literal");
pfile->buffer->cur = cur; pfile->buffer->cur = cur;
if (first_buff == NULL) if (first_buff == NULL)
create_literal (pfile, token, base, cur - base, type); create_literal (pfile, token, base, cur - base, type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment