From a3e6e8d304b56208f4faf3decc7e4b658e2f8679 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 29 Nov 2018 19:46:45 +0000 Subject: Allow single field struct #raw_union --- src/check_type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_type.cpp') 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"); } -- cgit v1.2.3