[qfcc] Treat opaque structs as not anonymous

I don't know why the segfault happened where it did, but
forward-declared structs certainly can't be used as anonymous structs.
This commit is contained in:
Bill Currie 2020-03-04 18:38:04 +09:00
parent 7a2335e9f4
commit f532780dbe

View file

@ -274,7 +274,7 @@ is_anonymous_struct (specifier_t spec)
if (!is_struct (spec.type)) {
return 0;
}
if (spec.type->t.symtab->parent) {
if (!spec.type->t.symtab || spec.type->t.symtab->parent) {
return 0;
}
// struct and union type names always begin with "tag ". Untagged s/u