diff options
| author | gingerBill <bill@gingerbill.org> | 2021-06-05 18:25:51 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-06-05 18:25:51 +0100 |
| commit | 104aea9f42db189d4ea2c626958c97e741932f4e (patch) | |
| tree | b06d12aad262f598ebcba619676ec3c2168cc4d1 /src/check_expr.cpp | |
| parent | a2f2041aa68295a3e7d5c28d338b2bda7dfd1e57 (diff) | |
Improve error message for addressing a swizzle intermediate array value
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index eddd7f369..c71479c0a 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1805,6 +1805,10 @@ void check_unary_expr(CheckerContext *c, Operand *o, Token op, Ast *node) { case Addressing_Constant: error(op, "Cannot take the pointer address of '%s' which is a constant", str); break; + case Addressing_SwizzleValue: + case Addressing_SwizzleVariable: + error(op, "Cannot take the pointer address of '%s' which is a swizzle intermediate array value", str); + break; default: error(op, "Cannot take the pointer address of '%s'", str); break; |