Flexible array member added, zero sized structs removed.

This commit is contained in:
Christoffer Lerno
2021-12-14 18:53:23 +01:00
parent 5ddbf50e83
commit 680b077eb1
30 changed files with 252 additions and 35 deletions

View File

@@ -268,6 +268,8 @@ bool type_is_homogenous_aggregate(Type *type, Type **base, unsigned *elements)
if (type_size(*base) * *elements != type_size(type)) return false;
}
goto TYPECHECK;
case TYPE_FLEXIBLE_ARRAY:
return false;
case TYPE_ARRAY:
// Empty arrays? Not homogenous.
if (type->array.len == 0) return false;