projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
603b8fc
)
Generate an error on empty declaration lists
author
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 8 Jun 2010 01:49:48 +0000
(18:49 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 8 Jun 2010 01:49:48 +0000
(18:49 -0700)
This causes an error for code such as 'float;'
glsl_parser.ypp
patch
|
blob
|
history
diff --git
a/glsl_parser.ypp
b/glsl_parser.ypp
index 86ec6f584249c5c8f8893364e1d0ee23fee9493a..a2ce2af877eb2085444561ec8d0a44e362ff73ef 100644
(file)
--- 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
{