harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1d768112aa06fc72a83e58745291e6cf0dd4d897
parent c64fd820084807a93c0e05ea940f1db00d1c0cb9
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 12 Jan 2021 11:52:55 -0500

gen: add stupid fucking hack

Diffstat:
Msrc/gen.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gen.c b/src/gen.c @@ -646,7 +646,9 @@ gen_expr_cast(struct gen_context *ctx, return; } - if (type_is_aggregate(expr->cast.value->result)) { + if (type_is_aggregate(expr->cast.value->result) + && expr->cast.value->type == EXPR_CONSTANT) { + // This is a stupid fucking hack alloc_temp(ctx, &in, expr->cast.value->result, "cast.in.%d"); qval_deref(&in); } else {