diff options
Diffstat (limited to 'codegen.c')
| -rw-r--r-- | codegen.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -515,12 +515,13 @@ static void emit_expr_list( emit_expr(outfile, node->expr, node->next == NULL ? dst : NULL); } -static void emit_paren( +static void emit_cast( FILE* outfile, - const struct paren_node* node, + const struct cast_node* node, const struct lval_def* dst ) { - emit_expr_list(outfile, node->expr_list, dst); + /* TODO: for anything but a reinterpret cast this is garbage */ + emit_expr(outfile, node->expr, dst); } static void emit_expr( @@ -557,7 +558,10 @@ static void emit_expr( emit_binary(outfile, &node->inner.binary, dst); break; case EXPR_PAREN: - emit_paren(outfile, &node->inner.paren, dst); + emit_expr_list(outfile, node->inner.paren.expr_list, dst); + break; + case EXPR_CAST: + emit_cast(outfile, &node->inner.cast, dst); break; } } |
