diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/diagnostic')
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C | 11 | ||||
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C | 4 | ||||
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C new file mode 100644 index 000000000..450a0fac6 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C @@ -0,0 +1,11 @@ +// { dg-do compile } +// { dg-options "-pedantic" } +typedef void F(void); + +void foo() +{ + void* p = 0; + F* f1 = reinterpret_cast<F*>(p); // { dg-warning "ISO" } +#pragma GCC diagnostic ignored "-pedantic" + F* f2 = reinterpret_cast<F*>(p); +} diff --git a/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C new file mode 100644 index 000000000..6be3f1436 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr58979.C @@ -0,0 +1,4 @@ +// PR c++/58979 +// { dg-do compile } + +int i = 0->*0; // { dg-error "invalid type argument of" } diff --git a/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C new file mode 100644 index 000000000..d1cf2c7fa --- /dev/null +++ b/gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pr59838.C @@ -0,0 +1,4 @@ +// PR c++/59838 +// { dg-do compile } + +enum E { a, b = (E) a }; // { dg-error "conversion to incomplete type" } |