OSDN Git Service

* c-c++-common/raw-string-1.c: Combine C and C++ raw string tests.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Mar 2010 19:40:36 +0000 (19:40 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Mar 2010 19:40:36 +0000 (19:40 +0000)
* c-c++-common/raw-string-2.c: Combine C and C++ raw string tests.
* c-c++-common/raw-string-3.c: Combine C and C++ raw string tests.
* c-c++-common/raw-string-4.c: Combine C and C++ raw string tests.
* c-c++-common/raw-string-5.c: Combine C and C++ raw string tests.
* c-c++-common/raw-string-6.c: Combine C and C++ raw string tests.
* c-c++-common/raw-string-7.c: Combine C and C++ raw string tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157803 138bc75d-0d04-0410-961f-82ee72b054a4

19 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/raw-string-1.c [moved from gcc/testsuite/g++.dg/ext/raw-string-1.C with 91% similarity]
gcc/testsuite/c-c++-common/raw-string-2.c [moved from gcc/testsuite/g++.dg/ext/raw-string-2.C with 92% similarity]
gcc/testsuite/c-c++-common/raw-string-3.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/raw-string-4.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/raw-string-5.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/raw-string-6.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/raw-string-7.c [moved from gcc/testsuite/g++.dg/ext/raw-string-7.C with 82% similarity]
gcc/testsuite/g++.dg/ext/raw-string-3.C [deleted file]
gcc/testsuite/g++.dg/ext/raw-string-4.C [deleted file]
gcc/testsuite/g++.dg/ext/raw-string-5.C [deleted file]
gcc/testsuite/g++.dg/ext/raw-string-6.C [deleted file]
gcc/testsuite/gcc.dg/raw-string-1.c [deleted file]
gcc/testsuite/gcc.dg/raw-string-2.c [deleted file]
gcc/testsuite/gcc.dg/raw-string-3.c [deleted file]
gcc/testsuite/gcc.dg/raw-string-4.c [deleted file]
gcc/testsuite/gcc.dg/raw-string-5.c [deleted file]
gcc/testsuite/gcc.dg/raw-string-6.c [deleted file]
gcc/testsuite/gcc.dg/raw-string-7.c [deleted file]

index 5fe5fc9..e4d15c0 100644 (file)
@@ -1,3 +1,13 @@
+2010-03-29  Jason Merrill  <jason@redhat.com>
+
+       * c-c++-common/raw-string-1.c: Combine C and C++ raw string tests.
+       * c-c++-common/raw-string-2.c: Combine C and C++ raw string tests.
+       * c-c++-common/raw-string-3.c: Combine C and C++ raw string tests.
+       * c-c++-common/raw-string-4.c: Combine C and C++ raw string tests.
+       * c-c++-common/raw-string-5.c: Combine C and C++ raw string tests.
+       * c-c++-common/raw-string-6.c: Combine C and C++ raw string tests.
+       * c-c++-common/raw-string-7.c: Combine C and C++ raw string tests.
+
 2010-03-29  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/43560
similarity index 91%
rename from gcc/testsuite/g++.dg/ext/raw-string-1.C
rename to gcc/testsuite/c-c++-common/raw-string-1.c
index c2426d5..b790a31 100644 (file)
@@ -1,5 +1,14 @@
 // { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-require-effective-target wchar }
+// { dg-options "-std=gnu99 -Wno-c++-compat" { target c } }
+// { dg-options "-std=c++0x" { target c++ } }
+
+#ifndef __cplusplus
+#include <wchar.h>
+
+typedef __CHAR16_TYPE__        char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+#endif
 
 const char s0[] = R"(a\
 \u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb
similarity index 92%
rename from gcc/testsuite/g++.dg/ext/raw-string-2.C
rename to gcc/testsuite/c-c++-common/raw-string-2.c
index d2fe9aa..503bcf5 100644 (file)
@@ -1,5 +1,14 @@
 // { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-require-effective-target wchar }
+// { dg-options "-std=gnu99 -Wno-c++-compat" { target c } }
+// { dg-options "-std=c++0x" { target c++ } }
+
+#ifndef __cplusplus
+#include <wchar.h>
+
+typedef __CHAR16_TYPE__        char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+#endif
 
 #define R
 #define u
diff --git a/gcc/testsuite/c-c++-common/raw-string-3.c b/gcc/testsuite/c-c++-common/raw-string-3.c
new file mode 100644 (file)
index 0000000..df9e275
--- /dev/null
@@ -0,0 +1,59 @@
+// If not c++0x/gnu99, the {,u,u8,U,L}R prefix should be parsed as separate
+// token.
+// { dg-do compile }
+// { dg-options "" { target c } }
+// { dg-options "-std=c++98" { target c++ } }
+
+const void     *s0     = R"(a)";       // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 7 }
+const void     *s1     = uR"(a)";      // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 9 }
+const void     *s2     = UR"(a)";      // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 11 }
+const void     *s3     = u8R"(a)";     // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 13 }
+const void     *s4     = LR"(a)";      // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 15 }
+
+const int      i0      = R'a';         // { dg-error "expected ',' or ';'" }
+               // { dg-error "was not declared" "" { target c++ } 18 }
+const int      i1      = uR'a';        // { dg-error "expected ',' or ';'" }
+               // { dg-error "was not declared" "" { target c++ } 20 }
+const int      i2      = UR'a';        // { dg-error "expected ',' or ';'" }
+               // { dg-error "was not declared" "" { target c++ } 22 }
+const int      i3      = u8R'a';       // { dg-error "expected ',' or ';'" }
+               // { dg-error "was not declared" "" { target c++ } 24 }
+const int      i4      = LR'a';        // { dg-error "expected ',' or ';'" }
+               // { dg-error "was not declared" "" { target c++ } 26 }
+
+#define R      "a"
+#define uR     "b"
+#define UR     "c"
+#define u8R    "d"
+#define LR     "e"
+
+const void     *s5     = R"(a)";
+const void     *s6     = uR"(a)";
+const void     *s7     = UR"(a)";
+const void     *s8     = u8R"(a)";
+const void     *s9     = LR"(a)";
+
+#undef R
+#undef uR
+#undef UR
+#undef u8R
+#undef LR
+
+#define R      1 +
+#define uR     2 +
+#define UR     3 +
+#define u8R    4 +
+#define LR     5 +
+
+const int      i5      = R'a';
+const int      i6      = uR'a';
+const int      i7      = UR'a';
+const int      i8      = u8R'a';
+const int      i9      = LR'a';
+
+int main () {}
diff --git a/gcc/testsuite/c-c++-common/raw-string-4.c b/gcc/testsuite/c-c++-common/raw-string-4.c
new file mode 100644 (file)
index 0000000..626e7f2
--- /dev/null
@@ -0,0 +1,29 @@
+// R is not applicable for character literals.
+// { dg-do compile }
+// { dg-options "-std=gnu99" { target c } }
+// { dg-options "-std=c++0x" { target c++ } }
+
+const int      i0      = R'a'; // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 6 }
+const int      i1      = uR'a';        // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 8 }
+const int      i2      = UR'a';        // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 10 }
+const int      i3      = u8R'a';       // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 12 }
+const int      i4      = LR'a';        // { dg-error "was not declared|undeclared" }
+               // { dg-error "expected ',' or ';'" "" { target *-*-* } 14 }
+
+#define R      1 +
+#define uR     2 +
+#define UR     3 +
+#define u8R    4 +
+#define LR     5 +
+
+const int      i5      = R'a';
+const int      i6      = uR'a';
+const int      i7      = UR'a';
+const int      i8      = u8R'a';
+const int      i9      = LR'a';
+
+int main () {}
diff --git a/gcc/testsuite/c-c++-common/raw-string-5.c b/gcc/testsuite/c-c++-common/raw-string-5.c
new file mode 100644 (file)
index 0000000..adcdb75
--- /dev/null
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=gnu99" { target c } }
+// { dg-options "-std=c++0x" { target c++ } }
+
+const void *s0 = R"0123456789abcdefg()0123456789abcdefg";
+       // { dg-error "raw string delimiter longer" "" { target *-*-* } 5 }
+       // { dg-error "stray" "" { target *-*-* } 5 }
+const void *s1 = R" () ";
+       // { dg-error "invalid character" "" { target *-*-* } 8 }
+       // { dg-error "stray" "" { target *-*-* } 8 }
+const void *s2 = R"    ()      ";
+       // { dg-error "invalid character" "" { target *-*-* } 11 }
+       // { dg-error "stray" "" { target *-*-* } 11 }
+const void *s3 = R")())";
+       // { dg-error "invalid character" "" { target *-*-* } 14 }
+       // { dg-error "stray" "" { target *-*-* } 14 }
+const void *s4 = R"@()@";
+       // { dg-error "invalid character" "" { target *-*-* } 17 }
+       // { dg-error "stray" "" { target *-*-* } 17 }
+const void *s5 = R"$()$";
+       // { dg-error "invalid character" "" { target *-*-* } 20 }
+       // { dg-error "stray" "" { target *-*-* } 20 }
+const void *s6 = R"\u0040()\u0040";
+       // { dg-error "invalid character" "" { target *-*-* } 23 }
+       // { dg-error "stray" "" { target *-*-* } 23 }
+
+int main () {}
diff --git a/gcc/testsuite/c-c++-common/raw-string-6.c b/gcc/testsuite/c-c++-common/raw-string-6.c
new file mode 100644 (file)
index 0000000..a3ae422
--- /dev/null
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// { dg-options "-std=gnu99" { target c } }
+// { dg-options "-std=c++0x" { target c++ } }
+
+const void *s0 = R"ouch()ouCh";        // { dg-error "at end of input" }
+       // { dg-error "unterminated raw string" "" { target *-*-* } 5 }
similarity index 82%
rename from gcc/testsuite/g++.dg/ext/raw-string-7.C
rename to gcc/testsuite/c-c++-common/raw-string-7.c
index 24737bc..0c55663 100644 (file)
@@ -1,17 +1,18 @@
 // The trailing whitespace after \ and before newline extension
 // breaks full compliance for raw strings.
 // { dg-do run { xfail *-*-* } }
-// { dg-options "-std=c++0x" }
+// { dg-options "-std=gnu99" { target c } }
+// { dg-options "-std=c++0x" { target c++ } }
 
 // Note, there is a single space after \ on the following line.
 const char *s0 = R"(\ 
 )";
-// { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 7 }
+// { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 8 }
 
 // Note, there is a single tab after \ on the following line.
 const char *s1 = R"(\  
 )";
-// { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 12 }
+// { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 13 }
 
 int
 main (void)
diff --git a/gcc/testsuite/g++.dg/ext/raw-string-3.C b/gcc/testsuite/g++.dg/ext/raw-string-3.C
deleted file mode 100644 (file)
index bb2e0c7..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// If c++98, the {,u,u8,U,L}R prefix should be parsed as separate
-// token.
-// { dg-do compile }
-// { dg-options "-std=c++98" }
-
-const void     *s0     = R"(a)";       // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 6 }
-const void     *s1     = uR"(a)";      // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 8 }
-const void     *s2     = UR"(a)";      // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 10 }
-const void     *s3     = u8R"(a)";     // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 12 }
-const void     *s4     = LR"(a)";      // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 14 }
-
-const int      i0      = R'a'; // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 17 }
-const int      i1      = uR'a';        // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 19 }
-const int      i2      = UR'a';        // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 21 }
-const int      i3      = u8R'a';       // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 23 }
-const int      i4      = LR'a';        // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 25 }
-
-#define R      "a"
-#define uR     "b"
-#define UR     "c"
-#define u8R    "d"
-#define LR     "e"
-
-const void     *s5     = R"(a)";
-const void     *s6     = uR"(a)";
-const void     *s7     = UR"(a)";
-const void     *s8     = u8R"(a)";
-const void     *s9     = LR"(a)";
-
-#undef R
-#undef uR
-#undef UR
-#undef u8R
-#undef LR
-
-#define R      1 +
-#define uR     2 +
-#define UR     3 +
-#define u8R    4 +
-#define LR     5 +
-
-const int      i5      = R'a';
-const int      i6      = uR'a';
-const int      i7      = UR'a';
-const int      i8      = u8R'a';
-const int      i9      = LR'a';
-
-int main () {}
diff --git a/gcc/testsuite/g++.dg/ext/raw-string-4.C b/gcc/testsuite/g++.dg/ext/raw-string-4.C
deleted file mode 100644 (file)
index 03179be..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// R is not applicable for character literals.
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
-
-const int      i0      = R'a'; // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 5 }
-const int      i1      = uR'a';        // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 7 }
-const int      i2      = UR'a';        // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 9 }
-const int      i3      = u8R'a';       // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 11 }
-const int      i4      = LR'a';        // { dg-error "was not declared" }
-               // { dg-error "expected ',' or ';'" "" { target *-*-* } 13 }
-
-#define R      1 +
-#define uR     2 +
-#define UR     3 +
-#define u8R    4 +
-#define LR     5 +
-
-const int      i5      = R'a';
-const int      i6      = uR'a';
-const int      i7      = UR'a';
-const int      i8      = u8R'a';
-const int      i9      = LR'a';
-
-int main () {}
diff --git a/gcc/testsuite/g++.dg/ext/raw-string-5.C b/gcc/testsuite/g++.dg/ext/raw-string-5.C
deleted file mode 100644 (file)
index 3808fcf..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
-
-const void *s0 = R"0123456789abcdefg()0123456789abcdefg";
-       // { dg-error "raw string delimiter longer" "" { target *-*-* } 4 }
-       // { dg-error "stray" "" { target *-*-* } 4 }
-const void *s1 = R" () ";
-       // { dg-error "invalid character" "" { target *-*-* } 7 }
-       // { dg-error "stray" "" { target *-*-* } 7 }
-const void *s2 = R"    ()      ";
-       // { dg-error "invalid character" "" { target *-*-* } 10 }
-       // { dg-error "stray" "" { target *-*-* } 10 }
-const void *s3 = R")())";
-       // { dg-error "invalid character" "" { target *-*-* } 13 }
-       // { dg-error "stray" "" { target *-*-* } 13 }
-const void *s4 = R"@()@";
-       // { dg-error "invalid character" "" { target *-*-* } 16 }
-       // { dg-error "stray" "" { target *-*-* } 16 }
-const void *s5 = R"$()$";
-       // { dg-error "invalid character" "" { target *-*-* } 19 }
-       // { dg-error "stray" "" { target *-*-* } 19 }
-const void *s6 = R"\u0010()\u0010";
-       // { dg-error "invalid character" "" { target *-*-* } 22 }
-       // { dg-error "stray" "" { target *-*-* } 22 }
-
-int main () {}
diff --git a/gcc/testsuite/g++.dg/ext/raw-string-6.C b/gcc/testsuite/g++.dg/ext/raw-string-6.C
deleted file mode 100644 (file)
index 7906d40..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
-
-const void *s0 = R"ouch()ouCh";        // { dg-error "at end of input" }
-       // { dg-error "unterminated raw string" "" { target *-*-* } 4 }
diff --git a/gcc/testsuite/gcc.dg/raw-string-1.c b/gcc/testsuite/gcc.dg/raw-string-1.c
deleted file mode 100644 (file)
index f556b3f..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/* { dg-do run } */
-/* { dg-require-effective-target wchar } */
-/* { dg-options "-std=gnu99" } */
-
-#include <wchar.h>
-
-typedef __CHAR16_TYPE__        char16_t;
-typedef __CHAR32_TYPE__ char32_t;
-
-const char s0[] = R"[a\
-\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb
-c]";
-const char s1[] = "a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc";
-const char s2[] = R"*|*[a\
-b
-c]"
-c]*|"
-c]*|*";
-const char s3[] = "ab\nc]\"\nc]*|\"\nc";
-
-const char t0[] = u8R"[a\
-\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb
-c]";
-const char t1[] = u8"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc";
-const char t2[] = u8R"*|*[a\
-b
-c]"
-c]*|"
-c]*|*";
-const char t3[] = u8"ab\nc]\"\nc]*|\"\nc";
-
-const char16_t u0[] = uR"[a\
-\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb
-c]";
-const char16_t u1[] = u"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc";
-const char16_t u2[] = uR"*|*[a\
-b
-c]"
-c]*|"
-c]*|*";
-const char16_t u3[] = u"ab\nc]\"\nc]*|\"\nc";
-
-const char32_t U0[] = UR"[a\
-\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb
-c]";
-const char32_t U1[] = U"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc";
-const char32_t U2[] = UR"*|*[a\
-b
-c]"
-c]*|"
-c]*|*";
-const char32_t U3[] = U"ab\nc]\"\nc]*|\"\nc";
-
-const wchar_t L0[] = LR"[a\
-\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb
-c]";
-const wchar_t L1[] = L"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc";
-const wchar_t L2[] = LR"*|*[a\
-b
-c]"
-c]*|"
-c]*|*";
-const wchar_t L3[] = L"ab\nc]\"\nc]*|\"\nc";
-
-int
-main (void)
-{
-  if (sizeof (s0) != sizeof (s1)
-      || __builtin_memcmp (s0, s1, sizeof (s0)) != 0)
-    __builtin_abort ();
-  if (sizeof (s2) != sizeof (s3)
-      || __builtin_memcmp (s2, s3, sizeof (s2)) != 0)
-    __builtin_abort ();
-  if (sizeof (t0) != sizeof (t1)
-      || __builtin_memcmp (t0, t1, sizeof (t0)) != 0)
-    __builtin_abort ();
-  if (sizeof (t2) != sizeof (t3)
-      || __builtin_memcmp (t2, t3, sizeof (t2)) != 0)
-    __builtin_abort ();
-  if (sizeof (u0) != sizeof (u1)
-      || __builtin_memcmp (u0, u1, sizeof (u0)) != 0)
-    __builtin_abort ();
-  if (sizeof (u2) != sizeof (u3)
-      || __builtin_memcmp (u2, u3, sizeof (u2)) != 0)
-    __builtin_abort ();
-  if (sizeof (U0) != sizeof (U1)
-      || __builtin_memcmp (U0, U1, sizeof (U0)) != 0)
-    __builtin_abort ();
-  if (sizeof (U2) != sizeof (U3)
-      || __builtin_memcmp (U2, U3, sizeof (U2)) != 0)
-    __builtin_abort ();
-  if (sizeof (L0) != sizeof (L1)
-      || __builtin_memcmp (L0, L1, sizeof (L0)) != 0)
-    __builtin_abort ();
-  if (sizeof (L2) != sizeof (L3)
-      || __builtin_memcmp (L2, L3, sizeof (L2)) != 0)
-    __builtin_abort ();
-  if (sizeof (R"*[]*") != 1
-      || __builtin_memcmp (R"*[]*", "", 1) != 0)
-    __builtin_abort ();
-  return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/raw-string-2.c b/gcc/testsuite/gcc.dg/raw-string-2.c
deleted file mode 100644 (file)
index 4517a03..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/* { dg-do run } */
-/* { dg-require-effective-target wchar } */
-/* { dg-options "-std=gnu99" } */
-
-#include <wchar.h>
-
-typedef __CHAR16_TYPE__        char16_t;
-typedef __CHAR32_TYPE__ char32_t;
-
-#define R
-#define u
-#define uR
-#define U
-#define UR
-#define u8
-#define u8R
-#define L
-#define LR
-
-const char s00[] = R"[a]" "[b]";
-const char s01[] = "[a]" R"*[b]*";
-const char s02[] = R"[a]" R"[b]";
-const char s03[] = R"-[a]-" u8"[b]";
-const char s04[] = "[a]" u8R"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ";
-const char s05[] = R"[a]" u8R"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL";
-const char s06[] = u8R";([a];(" "[b]";
-const char s07[] = u8"[a]" R"[b]";
-const char s08[] = u8R"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-";
-const char s09[] = u8R"/^&|~!=,"'\[a]/^&|~!=,"'\" u8"[b]";
-const char s10[] = u8"[a]" u8R"0123456789abcdef[b]0123456789abcdef";
-const char s11[] = u8R"ghijklmnopqrstuv[a]ghijklmnopqrstuv" u8R"w[b]w";
-
-const char16_t u03[] = R"-[a]-" u"[b]";
-const char16_t u04[] = "[a]" uR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ";
-const char16_t u05[] = R"[a]" uR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL";
-const char16_t u06[] = uR";([a];(" "[b]";
-const char16_t u07[] = u"[a]" R"[b]";
-const char16_t u08[] = uR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-";
-const char16_t u09[] = uR"/^&|~!=,"'\[a]/^&|~!=,"'\" u"[b]";
-const char16_t u10[] = u"[a]" uR"0123456789abcdef[b]0123456789abcdef";
-const char16_t u11[] = uR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" uR"w[b]w";
-
-const char32_t U03[] = R"-[a]-" U"[b]";
-const char32_t U04[] = "[a]" UR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ";
-const char32_t U05[] = R"[a]" UR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL";
-const char32_t U06[] = UR";([a];(" "[b]";
-const char32_t U07[] = U"[a]" R"[b]";
-const char32_t U08[] = UR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-";
-const char32_t U09[] = UR"/^&|~!=,"'\[a]/^&|~!=,"'\" U"[b]";
-const char32_t U10[] = U"[a]" UR"0123456789abcdef[b]0123456789abcdef";
-const char32_t U11[] = UR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" UR"w[b]w";
-
-const wchar_t L03[] = R"-[a]-" L"[b]";
-const wchar_t L04[] = "[a]" LR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ";
-const wchar_t L05[] = R"[a]" LR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL";
-const wchar_t L06[] = LR";([a];(" "[b]";
-const wchar_t L07[] = L"[a]" R"[b]";
-const wchar_t L08[] = LR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-";
-const wchar_t L09[] = LR"/^&|~!=,"'\[a]/^&|~!=,"'\" L"[b]";
-const wchar_t L10[] = L"[a]" LR"0123456789abcdef[b]0123456789abcdef";
-const wchar_t L11[] = LR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" LR"w[b]w";
-
-int
-main (void)
-{
-#define TEST(str, val) \
-  if (sizeof (str) != sizeof (val) \
-      || __builtin_memcmp (str, val, sizeof (str)) != 0) \
-    __builtin_abort ()
-  TEST (s00, "a[b]");
-  TEST (s01, "[a]b");
-  TEST (s02, "ab");
-  TEST (s03, "a[b]");
-  TEST (s04, "[a]b");
-  TEST (s05, "ab");
-  TEST (s06, "a[b]");
-  TEST (s07, "[a]b");
-  TEST (s08, "ab");
-  TEST (s09, "a[b]");
-  TEST (s10, "[a]b");
-  TEST (s11, "ab");
-  TEST (u03, u"a[b]");
-  TEST (u04, u"[a]b");
-  TEST (u05, u"ab");
-  TEST (u06, u"a[b]");
-  TEST (u07, u"[a]b");
-  TEST (u08, u"ab");
-  TEST (u09, u"a[b]");
-  TEST (u10, u"[a]b");
-  TEST (u11, u"ab");
-  TEST (U03, U"a[b]");
-  TEST (U04, U"[a]b");
-  TEST (U05, U"ab");
-  TEST (U06, U"a[b]");
-  TEST (U07, U"[a]b");
-  TEST (U08, U"ab");
-  TEST (U09, U"a[b]");
-  TEST (U10, U"[a]b");
-  TEST (U11, U"ab");
-  TEST (L03, L"a[b]");
-  TEST (L04, L"[a]b");
-  TEST (L05, L"ab");
-  TEST (L06, L"a[b]");
-  TEST (L07, L"[a]b");
-  TEST (L08, L"ab");
-  TEST (L09, L"a[b]");
-  TEST (L10, L"[a]b");
-  TEST (L11, L"ab");
-  return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/raw-string-3.c b/gcc/testsuite/gcc.dg/raw-string-3.c
deleted file mode 100644 (file)
index 9226411..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* If not gnu99, the {,u,u8,U,L}R prefix should be parsed as separate
-   token. */
-/* { dg-do compile } */
-/* { dg-options "" } */
-
-const void     *s0     = R"[a]";       /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 6 } */
-const void     *s1     = uR"[a]";      /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 8 } */
-const void     *s2     = UR"[a]";      /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 10 } */
-const void     *s3     = u8R"[a]";     /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 12 } */
-const void     *s4     = LR"[a]";      /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 14 } */
-
-const int      i0      = R'a';         /* { dg-error "expected ',' or ';'" } */
-const int      i1      = uR'a';        /* { dg-error "expected ',' or ';'" } */
-const int      i2      = UR'a';        /* { dg-error "expected ',' or ';'" } */
-const int      i3      = u8R'a';       /* { dg-error "expected ',' or ';'" } */
-const int      i4      = LR'a';        /* { dg-error "expected ',' or ';'" } */
-
-#define R      "a"
-#define uR     "b"
-#define UR     "c"
-#define u8R    "d"
-#define LR     "e"
-
-const void     *s5     = R"[a]";
-const void     *s6     = uR"[a]";
-const void     *s7     = UR"[a]";
-const void     *s8     = u8R"[a]";
-const void     *s9     = LR"[a]";
-
-#undef R
-#undef uR
-#undef UR
-#undef u8R
-#undef LR
-
-#define R      1 +
-#define uR     2 +
-#define UR     3 +
-#define u8R    4 +
-#define LR     5 +
-
-const int      i5      = R'a';
-const int      i6      = uR'a';
-const int      i7      = UR'a';
-const int      i8      = u8R'a';
-const int      i9      = LR'a';
-
-int main () {}
diff --git a/gcc/testsuite/gcc.dg/raw-string-4.c b/gcc/testsuite/gcc.dg/raw-string-4.c
deleted file mode 100644 (file)
index 24d56ed..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* R is not applicable for character literals.  */
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-const int      i0      = R'a'; /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 5 } */
-const int      i1      = uR'a';        /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 7 } */
-const int      i2      = UR'a';        /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 9 } */
-const int      i3      = u8R'a';       /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 11 } */
-const int      i4      = LR'a';        /* { dg-error "undeclared" } */
-               /* { dg-error "expected ',' or ';'" "" { target *-*-* } 13 } */
-
-#define R      1 +
-#define uR     2 +
-#define UR     3 +
-#define u8R    4 +
-#define LR     5 +
-
-const int      i5      = R'a';
-const int      i6      = uR'a';
-const int      i7      = UR'a';
-const int      i8      = u8R'a';
-const int      i9      = LR'a';
-
-int main () {}
diff --git a/gcc/testsuite/gcc.dg/raw-string-5.c b/gcc/testsuite/gcc.dg/raw-string-5.c
deleted file mode 100644 (file)
index 3dbf97d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-const void *s0 = R"0123456789abcdefg[]0123456789abcdefg";
-       /* { dg-error "raw string delimiter longer" "" { target *-*-* } 4 } */
-       /* { dg-error "stray" "" { target *-*-* } 4 } */
-const void *s1 = R" [] ";
-       /* { dg-error "invalid character" "" { target *-*-* } 7 } */
-       /* { dg-error "stray" "" { target *-*-* } 7 } */
-const void *s2 = R"    []      ";
-       /* { dg-error "invalid character" "" { target *-*-* } 10 } */
-       /* { dg-error "stray" "" { target *-*-* } 10 } */
-const void *s3 = R"][]]";
-       /* { dg-error "invalid character" "" { target *-*-* } 13 } */
-       /* { dg-error "stray" "" { target *-*-* } 13 } */
-const void *s4 = R"@[]@";
-       /* { dg-error "invalid character" "" { target *-*-* } 16 } */
-       /* { dg-error "stray" "" { target *-*-* } 16 } */
-const void *s5 = R"$[]$";
-       /* { dg-error "invalid character" "" { target *-*-* } 19 } */
-       /* { dg-error "stray" "" { target *-*-* } 19 } */
-
-int main () {}
diff --git a/gcc/testsuite/gcc.dg/raw-string-6.c b/gcc/testsuite/gcc.dg/raw-string-6.c
deleted file mode 100644 (file)
index 338087a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
-
-const void *s0 = R"ouch[]ouCh";        /* { dg-error "expected expression at end of input" } */
-       /* { dg-error "unterminated raw string" "" { target *-*-* } 4 } */
diff --git a/gcc/testsuite/gcc.dg/raw-string-7.c b/gcc/testsuite/gcc.dg/raw-string-7.c
deleted file mode 100644 (file)
index 5bb4bec..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* The trailing whitespace after \ and before newline extension
-   breaks full compliance for raw strings.  */
-/* { dg-do run { xfail *-*-* } } */
-/* { dg-options "-std=gnu99" } */
-
-/* Note, there is a single space after \ on the following line.  */
-const void *s0 = R"[\ 
-]";
-/* { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 7 } */
-
-/* Note, there is a single tab after \ on the following line.  */
-const void *s1 = R"[\  
-]";
-/* { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 12 } */
-
-int
-main (void)
-{
-  if (__builtin_strcmp (s0, "\\ \n") != 0
-      || __builtin_strcmp (s1, "\\\t\n") != 0)
-    __builtin_abort ();
-  return 0;
-}