diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-23 23:33:39 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-23 23:33:39 +0000 |
commit | c6deb5c58fde1c5115d9e92afb2ead8e7ac4fea0 (patch) | |
tree | da2fdb7ad3d07e806f87e07b8f2b891a7985e53c /libcpp | |
parent | 0755fde6008ab7a7ae98f3b4c5967191408431f3 (diff) |
PR preprocessor/48740
* lex.c (lex_raw_string): When raw string ends with
??) followed by raw prefix and ", ensure it is preprocessed
with ??) rather than ??].
* c-c++-common/raw-string-11.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 7 | ||||
-rw-r--r-- | libcpp/lex.c | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 8443a797a5f..47efbe63d7e 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,10 @@ +2011-04-24 Jakub Jelinek <jakub@redhat.com> + + PR preprocessor/48740 + * lex.c (lex_raw_string): When raw string ends with + ??) followed by raw prefix and ", ensure it is preprocessed + with ??) rather than ??]. + 2011-03-25 Release Manager * GCC 4.6.0 released. diff --git a/libcpp/lex.c b/libcpp/lex.c index c9b5c95df6a..3bf4886b6d2 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -1410,7 +1410,9 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base, raw_prefix_len) == 0 && cur[raw_prefix_len+1] == '"') { - cur += raw_prefix_len+2; + BUF_APPEND (")", 1); + base++; + cur += raw_prefix_len + 2; goto break_outer_loop; } else |