diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert3.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert3.C | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert3.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert3.C new file mode 100644 index 0000000..addde13 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert3.C @@ -0,0 +1,4 @@ +// { dg-do compile { target c++11 } } +static_assert(7 / 0, "X"); // { dg-error "non-constant condition" "non-constant" } +// { dg-warning "division by zero" "zero" { target *-*-* } 2 } +// { dg-error "division by zero is not a constant-expression" "not a constant" { target *-*-* } 2 } |