When parsing a union declaration, build a union type, not a struct type.
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 17 Dec 2007 18:01:54 +0000 (18:01 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 17 Dec 2007 18:01:54 +0000 (18:01 +0000)
[r18786]

parser.c

index d871a80..c4b9187 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1610,7 +1610,7 @@ static void parse_declaration_specifiers(declaration_specifiers_t *specifiers)
                        break;
                }
                case T_union: {
-                       type = allocate_type_zero(TYPE_COMPOUND_STRUCT);
+                       type = allocate_type_zero(TYPE_COMPOUND_UNION);
 
                        type->compound.declaration = parse_compound_type_specifier(false);
                        break;