60e9d01cf7
* c-decl.c (grokdeclarator): Don't give a warning about defaulting to int for plain complex which defaults to complex double. Do warn about defaulting to complex double if pedantic. Warn about complex integer types if pedantic. Warn about complex types if pedantic and not in C99 mode. * c-typeck.c (build_unary_op): If pedantic, warn about use of ~ for complex conjugation. testsuite: * gcc.dg/c90-complex-1.c, gcc.dg/c99-complex-1.c: New tests. From-SVN: r36478
8 lines
309 B
C
8 lines
309 B
C
/* Test for _Complex: in C99 only. */
|
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
|
/* { dg-do compile } */
|
|
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
|
|
|
|
_Complex double foo; /* { dg-bogus "warning" "warning in place of error" } */
|
|
/* { dg-error "C" "_Complex not in C90" { target *-*-* } 6 } */
|