aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 8df9c8b88..4fdffcaa3 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -1653,6 +1653,11 @@ bool check_is_not_addressable(CheckerContext *c, Operand *o) {
return false;
}
+ Ast *expr = unparen_expr(o->expr);
+ if (expr->kind == Ast_CompoundLit) {
+ return false;
+ }
+
if (o->mode != Addressing_Variable) {
return true;
}