RFC/RFHelp: c-decl.c rewrite - almost but not quite
Zack Weinberg
zack@codesourcery.com
Fri Mar 19 08:14:00 GMT 2004
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" } */
+}
More information about the Gcc-patches
mailing list