summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C25
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
index a0a2b75e30..d15e7aadce 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
@@ -1,9 +1,32 @@
// { dg-do compile { target c++98_only } }
// { dg-options "" }
-// These C++14 features are allowed in C++98 in non-ANSI modes.
+// C++98 features:
+
+#ifndef __cpp_rtti
+# error "__cpp_rtti"
+#elif __cpp_rtti != 199711
+# error "__cpp_rtti != 199711"
+#endif
+
+#ifndef __cpp_exceptions
+# error "__cpp_exceptions"
+#elif __cpp_exceptions != 199711
+# error "__cpp_exceptions != 199711"
+#endif
+
+// C++14 features allowed in C++98 in non-ANSI modes:
+
#ifndef __cpp_binary_literals
# error "__cpp_binary_literals"
#elif __cpp_binary_literals != 201304
# error "__cpp_binary_literals != 201304"
#endif
+
+// GNU VLA support:
+
+#ifndef __cpp_runtime_arrays
+# error "__cpp_runtime_arrays"
+#elif __cpp_runtime_arrays != 198712
+# error "__cpp_runtime_arrays != 198712"
+#endif