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:
@ -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
9
tests/tests2/81_types.c
Normal 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; }
|
||||
0
tests/tests2/81_types.expect
Normal file
0
tests/tests2/81_types.expect
Normal file
Reference in New Issue
Block a user