Union type sizing and code generation

This commit is contained in:
Krzosa Karol
2023-03-29 09:52:24 +02:00
parent b572f4ef7c
commit 9b91f77cf0
4 changed files with 98 additions and 57 deletions

View File

@@ -980,7 +980,7 @@ parse_file(Ast_File *file) {
if (!decl) break;
set_flag(decl->flags, AST_GLOBAL);
if (decl->kind == AST_STRUCT) {
if (decl->kind == AST_STRUCT || decl->kind == AST_UNION) {
decl->type = pctx->type_type;
decl->type_val = type_incomplete(decl);
decl->state = DECL_RESOLVED;