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.
From-SVN: r172903
+2011-04-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/48740
+ * c-c++-common/raw-string-11.c: New test.
+
2011-04-23 John David Anglin <dave.anglin@nrc-cnrc.ca>
* gcc.dg/pr48616.c (dg-options): Add -fno-common to options on
--- /dev/null
+// PR preprocessor/48740
+// { dg-options "-std=gnu99 -trigraphs -save-temps" { target c } }
+// { dg-options "-std=c++0x -save-temps" { target c++ } }
+// { dg-do run }
+
+int main ()
+{
+ return __builtin_memcmp (R"raw(foo%sbar%sfred%sbob?????)raw",
+ "foo%sbar%sfred%sbob?""?""?""?""?",
+ sizeof ("foo%sbar%sfred%sbob?""?""?""?""?"));
+}
+
+// { dg-final { cleanup-saved-temps } }
+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-04-20 Jim Meyering <meyering@redhat.com>
* files.c (destroy_cpp_file): Remove useless if-before-free.
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