Allow single field struct #raw_union
This commit is contained in:
1 parent
a747c03f29
commit
a3e6e8d304
1 file changed
+1
-1
+1
-1
@@ -333,7 +333,7 @@ void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *node, Array<
|
|||||||
|
|
||||||
scope_reserve(ctx->scope, min_field_count);
|
scope_reserve(ctx->scope, min_field_count);
|
||||||
|
|
||||||
if (st->is_raw_union) {
|
if (st->is_raw_union && min_field_count > 1) {
|
||||||
struct_type->Struct.is_raw_union = true;
|
struct_type->Struct.is_raw_union = true;
|
||||||
context = str_lit("struct #raw_union");
|
context = str_lit("struct #raw_union");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user