summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-16 22:09:12 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-16 22:09:12 +0000
commit414663ef52a3d3ed0aaedea35e473197c12219fa (patch)
tree4e3ef97fd1e90351d6242097b014f5729b0f5205 /libcpp
parent6e851ef38328b42659f5c7dd16c51ca28b10778b (diff)
downloadgcc-414663ef52a3d3ed0aaedea35e473197c12219fa.tar.gz
PR c++/45399
* lex.c (lex_raw_string): Don't check for embedded NUL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175121 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/lex.c8
2 files changed, 5 insertions, 8 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index e1c01c13660..e36edfa981d 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR preprocessor/48532
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 6c3be711504..d29f36d436d 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1270,7 +1270,6 @@ static void
lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
const uchar *cur)
{
- source_location saw_NUL = 0;
const uchar *raw_prefix;
unsigned int raw_prefix_len = 0;
enum cpp_ttype type;
@@ -1476,16 +1475,9 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
cur = base = pfile->buffer->cur;
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:
- 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;
if (first_buff == NULL)
create_literal (pfile, token, base, cur - base, type);