summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C b/gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C
new file mode 100644
index 00000000000..149fd0d162a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C
@@ -0,0 +1,17 @@
+// { dg-options -std=c++1y }
+
+int
+operator L""_Ls(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator u""_s16(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator U""_s32(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator u8""_u8s(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }