aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c90-complex-1.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-09-17 20:39:56 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2000-09-17 20:39:56 +0100
commit60e9d01cf742140d4d56eb8aaf7eced14a923141 (patch)
tree334934f9502cc4e6f33fbd5069958392abed651a /gcc/testsuite/gcc.dg/c90-complex-1.c
parentbc5006c72549c530c630f8a749612ea5ec2bb9e7 (diff)
downloadgcc-60e9d01cf742140d4d56eb8aaf7eced14a923141.zip
gcc-60e9d01cf742140d4d56eb8aaf7eced14a923141.tar.gz
gcc-60e9d01cf742140d4d56eb8aaf7eced14a923141.tar.bz2
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
Diffstat (limited to 'gcc/testsuite/gcc.dg/c90-complex-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/c90-complex-1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/c90-complex-1.c b/gcc/testsuite/gcc.dg/c90-complex-1.c
new file mode 100644
index 0000000..b65fc68
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c90-complex-1.c
@@ -0,0 +1,7 @@
+/* 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 } */