From: Ian Romanick Date: Tue, 8 Jun 2010 01:49:48 +0000 (-0700) Subject: Generate an error on empty declaration lists X-Git-Tag: 062012170305~10660^2~625^2~207 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cd2a5cc4b8eb1d445f2ae5311db8fda9d46b7a1;p=profile%2Fivi%2Fmesa.git Generate an error on empty declaration lists This causes an error for code such as 'float;' --- diff --git a/glsl_parser.ypp b/glsl_parser.ypp index 86ec6f5..a2ce2af 100644 --- a/glsl_parser.ypp +++ b/glsl_parser.ypp @@ -779,8 +779,13 @@ init_declarator_list: single_declaration: fully_specified_type { - $$ = new ast_declarator_list($1); - $$->set_location(yylloc); + if ($1->specifier->type_specifier != ast_struct) { + _mesa_glsl_error(& @1, state, "empty declaration list\n"); + YYERROR; + } else { + $$ = new ast_declarator_list($1); + $$->set_location(yylloc); + } } | fully_specified_type IDENTIFIER {