summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/static_assert3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/static_assert3.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert3.C4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert3.C b/gcc/testsuite/g++.dg/cpp0x/static_assert3.C
new file mode 100644
index 000000000..1ff2ffc94
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert3.C
@@ -0,0 +1,4 @@
+// { dg-options "-std=c++0x" }
+static_assert(7 / 0, "X"); // { dg-error "non-constant condition" }
+// { dg-warning "division by zero" "" { target *-*-* } 2 }
+// { dg-error "7 / 0.. is not a constant expression" "" { target *-*-* } 2 }