Commit 6f902029 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Require a constant expression for case statements.

parent b599d259
......@@ -547,7 +547,7 @@ cases: { $$ = NULL; }
| cases case { $$ = append_var( $1, $2 ); }
;
case: tCASE expr ':' field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 ));
case: tCASE expr_const ':' field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 ));
$$ = $4; if (!$$) $$ = make_var(NULL);
$$->attrs = append_attr( $$->attrs, a );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment