diff options
| author | gingerBill <bill@gingerbill.org> | 2022-06-02 12:10:43 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-06-02 12:10:43 +0100 |
| commit | bb7f291f5fa9d412d5ff15b8de4a46b6ad2704e2 (patch) | |
| tree | ea937bb951f272a956c19661372ff161c3292101 /src/check_expr.cpp | |
| parent | ba5f7c4e2af5c82c220b7e1796fde2f026ce4208 (diff) | |
Remove `simd_rem`; Disallow `simd_div` for integers
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index f954f1583..58972d2cf 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1618,6 +1618,9 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) { if (is_type_matrix(main_type)) { error(op, "Operator '%.*s' is only allowed with matrix types", LIT(op.string)); return false; + } else if (is_type_simd_vector(main_type) && is_type_integer(type)) { + error(op, "Operator '%.*s' is only allowed with #simd types with integer elements", LIT(op.string)); + return false; } /*fallthrough*/ case Token_Mul: @@ -1669,6 +1672,9 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) { if (!is_type_integer(type)) { error(op, "Operator '%.*s' is only allowed with integers", LIT(op.string)); return false; + } else if (is_type_simd_vector(main_type)) { + error(op, "Operator '%.*s' is only allowed with #simd types with integer elements", LIT(op.string)); + return false; } break; |