Support (void)foo for any type.

This commit is contained in:
Christoffer Lerno
2023-02-13 13:52:48 +01:00
parent 5e457be605
commit 3cfef690d3
6 changed files with 161 additions and 32 deletions

View File

@@ -382,6 +382,7 @@ static inline bool expr_cast_is_constant_eval(Expr *expr, ConstantEvalKind eval_
case CAST_SAPTR:
case CAST_SASA:
case CAST_ENUMLOW:
case CAST_VOID:
return exprid_is_constant_eval(expr->cast_expr.expr, eval_kind);
case CAST_PTRANY:
if (eval_kind == CONSTANT_EVAL_LOCAL_INIT || eval_kind == CONSTANT_EVAL_CONSTANT_VALUE) return false;