From d00a2ef82d6981b56f903a88ed69676924f502f2 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 6 Jun 2019 06:44:19 +0900 Subject: [PATCH] Convert constant vector expressions in binary expressions Fixes not being able to compare with eg [1, 2, 3] --- tools/qfcc/source/expr_binary.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/source/expr_binary.c b/tools/qfcc/source/expr_binary.c index 2aa963b3a..b3717c1e8 100644 --- a/tools/qfcc/source/expr_binary.c +++ b/tools/qfcc/source/expr_binary.c @@ -726,6 +726,7 @@ binary_expr (int op, expr_t *e1, expr_t *e2) expr_type_t *expr_type; convert_name (e1); + e1 = convert_vector (e1); if (e1->type == ex_block && e1->e.block.is_call && has_function_call (e2) && e1->e.block.result) { e = new_temp_def_expr (get_type (e1->e.block.result)); @@ -735,6 +736,7 @@ binary_expr (int op, expr_t *e1, expr_t *e2) return e1; convert_name (e2); + e2 = convert_vector (e2); if (e2->type == ex_error) return e2;