aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/utf-dflt2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/utf-dflt2.c')
-rw-r--r--gcc/testsuite/gcc.dg/utf-dflt2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/utf-dflt2.c b/gcc/testsuite/gcc.dg/utf-dflt2.c
new file mode 100644
index 00000000000..ab101f45b78
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/utf-dflt2.c
@@ -0,0 +1,12 @@
+/* If not gnu99, the u8 prefix should be parsed as separate tokens. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+const void *s0 = u8"a"; /* { dg-error "undeclared" } */
+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 5 } */
+
+#define u8 "a"
+
+const void *s1 = u8"a";
+
+int main () {}