This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC/RFHelp: c-decl.c rewrite - almost but not quite


Forgot to mention, this fixes PR 12931 too, here is the new testcase.

zw

===================================================================
Index: testsuite/gcc.dg/noncompile/incomplete-3.c
--- testsuite/gcc.dg/noncompile/incomplete-3.c	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/noncompile/incomplete-3.c	16 Mar 2004 21:06:32 -0000
@@ -0,0 +1,9 @@
+/* Both occurrences of "c" should get diagnostics.  PR 12391.  */
+typedef struct { int a; } b_t;
+
+int foo (void)
+{
+  b_t d;
+  struct b_t *c = &d;	/* { dg-warning "incompatible pointer type" } */
+  c->a;			/* { dg-error "incomplete type" } */
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]