8sa1-gcc/gcc/testsuite/gcc.dg/c90-complex-1.c
Joseph Myers 60e9d01cf7 c-decl.c (grokdeclarator): Don't give a warning about defaulting to int for plain complex which defaults...
* 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
2000-09-17 20:39:56 +01:00

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 } */