diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C')
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.dg/diagnostic/pedantic.C | 11 |
1 files changed, 11 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); +} |