aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-04-23 23:32:09 +0000
committerJakub Jelinek <jakub@redhat.com>2011-04-23 23:32:09 +0000
commit041bc4322be952100e376bc5e411b6db938b5ecd (patch)
tree512c00cfe469cc71e5b4077ab0e7dfb1018b4b2b /libcpp/lex.c
parent0c71b9a7352e63736a321878ae79db4d66c8fbd2 (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: https://gcc.gnu.org/svn/gcc/trunk@172903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/lex.c')
-rw-r--r--libcpp/lex.c4
1 files changed, 3 insertions, 1 deletions
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