Compound expression for union
This commit is contained in:
@@ -517,7 +517,7 @@ gen_expr(Ast_Expr *ast) {
|
||||
}
|
||||
|
||||
For(node->exprs) {
|
||||
if (is_struct(node->resolved_type))
|
||||
if (is_struct(node->resolved_type) || is_union(node->resolved_type))
|
||||
gen(".%Q = ", it->resolved_name);
|
||||
else if (is_array(node->resolved_type))
|
||||
gen("[%d] = ", (int)it->resolved_index);
|
||||
|
||||
Reference in New Issue
Block a user