Rob Shearman : widl: Require a constant expression for case statements.

Alexandre Julliard julliard at winehq.org
Tue Apr 22 06:47:36 CDT 2008


Module: wine
Branch: master
Commit: 6f9020290b03a5d9d458255922d3198aa234325d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6f9020290b03a5d9d458255922d3198aa234325d

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Apr 22 11:35:32 2008 +0100

widl: Require a constant expression for case statements.

---

 tools/widl/parser.y |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 709c861..0d80178 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -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 );
 						}




More information about the wine-cvs mailing list