aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.dg/c1x-static-assert-6.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.dg/c1x-static-assert-6.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.dg/c1x-static-assert-6.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.dg/c1x-static-assert-6.c b/gcc-4.8/gcc/testsuite/gcc.dg/c1x-static-assert-6.c
new file mode 100644
index 000000000..c544cadc2
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.dg/c1x-static-assert-6.c
@@ -0,0 +1,5 @@
+/* Test C1X static assertions. Non-constant-expression with -pedantic. */
+/* { dg-do compile } */
+/* { dg-options "-std=c1x -pedantic" } */
+
+_Static_assert ((int)(1.0 + 1.0), "non-constant-expression"); /* { dg-warning "not an integer constant expression" } */