Allow referencing a compound literal to act like C99

This commit is contained in:
gingerBill
2020-03-26 15:56:08 +00:00
parent 0a920b5439
commit 7909872877
2 changed files with 24 additions and 1 deletions

View File

@@ -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;
}