From 028ec0f2c3574fb465ffe18f3022a7fa16f25ef6 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 8 Mar 2018 15:22:42 -0500 Subject: enums with 1 field and explicit tag type still get the tag type closes #820 --- src/analyze.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index 74dfd003d9..37b2798f3e 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -2393,7 +2393,7 @@ static void resolve_enum_zero_bits(CodeGen *g, TypeTableEntry *enum_type) { } enum_type->data.enumeration.zero_bits_loop_flag = false; - enum_type->zero_bits = (field_count < 2); + enum_type->zero_bits = !type_has_bits(tag_int_type); enum_type->data.enumeration.zero_bits_known = true; } -- cgit v1.2.3