summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0174-PR-preprocessor-48740.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0174-PR-preprocessor-48740.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0174-PR-preprocessor-48740.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0174-PR-preprocessor-48740.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0174-PR-preprocessor-48740.patch
new file mode 100644
index 000000000..b41d59d7e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0174-PR-preprocessor-48740.patch
@@ -0,0 +1,48 @@
+From c6deb5c58fde1c5115d9e92afb2ead8e7ac4fea0 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sat, 23 Apr 2011 23:33:39 +0000
+Subject: [PATCH 174/200] 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
+
+new file mode 100644
+index 0000000..49ceba2
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/raw-string-11.c
+@@ -0,0 +1,13 @@
++// 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 } }
+index c9b5c95..3bf4886 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
+--
+1.7.0.4
+