ref: 07345f7f24d63fed872049435421452e92622483
parent: ee71aa8e400604c865f04db89601e2597da26ad5
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Aug 5 13:52:33 EDT 2014
Allow incomplete types in type names Type names and declaration uses the same code, and in this moment the code was generating an error always that we find an incomplete type, but this code was also executed in something like: (struct type *)
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -165,7 +165,9 @@
break;
}
}
- if (!tp->defined)
+
+ /* TODO: deal with external array declarations of [] */
+ if (!tp->defined && *sym->name)
error("declared variable '%s' of incomplete type", sym->name);
sym->type = tp;
return sym;