aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-11-29 19:46:45 +0000
committergingerBill <bill@gingerbill.org>2018-11-29 19:46:45 +0000
commita3e6e8d304b56208f4faf3decc7e4b658e2f8679 (patch)
tree7f401e9b68e1bf91f4283c62e57c4dfd90e7ce40 /src
parenta747c03f2905a3f6f591e5c8051c354b95d9fc8f (diff)
Allow single field struct #raw_union
Diffstat (limited to 'src')
-rw-r--r--src/check_type.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 858b1504c..886de99ee 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -333,7 +333,7 @@ void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *node, Array<
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;
context = str_lit("struct #raw_union");
}