Fix type parsing

the check on incomplete struct/union/enum types was too early,
disallowing mixed specifiers and qualifiers.  Simply rely on
the size (->c) field for that.  See testcases.
This commit is contained in:
Michael Matz
2016-03-24 15:44:01 +01:00
parent aa1ed616eb
commit f85db99ff0
4 changed files with 19 additions and 7 deletions

View File

@ -1 +1 @@
61_undefined_enum.c:1: error: unknown struct/union/enum
61_undefined_enum.c:1: error: unknown type size

9
tests/tests2/81_types.c Normal file
View File

@ -0,0 +1,9 @@
/* The following are all valid decls, even though some subtypes
are incomplete. */
enum E *e;
const enum E *e1;
enum E const *e2;
struct S *s;
const struct S *s1;
struct S const *s2;
int main () { return 0; }

View File