diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/pr7263-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/pr7263-3.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/pr7263-3.c b/gcc/testsuite/gcc.dg/cpp/pr7263-3.c new file mode 100644 index 000000000..efa619ad3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/pr7263-3.c @@ -0,0 +1,19 @@ +/* PR 7263: __extension__ keyword doesn't suppress warning on LL or ULL constants. */ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ +#include "pr7263-3.h" +__complex__ bar () /* { dg-error "ISO C does not support plain .complex. meaning .double complex." } */ +{ + return _Complex_I_ext; +} + +__extension__ __complex__ +bar2 () +{ + return _Complex_I; +} + +__complex__ bar3 () /* { dg-error "ISO C does not support plain .complex. meaning .double complex." } */ +{ + return _Complex_I; /* { dg-error "imaginary constants are a GCC extension" } */ +} |