widl: Require a constant expression for case statements.

This commit is contained in:
Rob Shearman 2008-04-22 11:35:32 +01:00 committed by Alexandre Julliard
parent b599d2596b
commit 6f9020290b

View File

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