diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index a2bbf1c03..a71563abb 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -153,7 +153,7 @@ int yylex (void); %token PROTECTED PROTOCOL PUBLIC SELECTOR REFERENCE SELF THIS %type optional_specifiers specifiers local_specifiers -%type storage_class save_storage +%type storage_class save_storage set_spec_storage %type type_specifier type_specifier_or_storage_class %type type @@ -349,6 +349,14 @@ save_storage } ; +set_spec_storage + : /* emtpy */ + { + $$ = $0; + $$.storage = current_storage; + } + ; + function_body : optional_state_expr { @@ -1229,7 +1237,7 @@ switch_block opt_init : cexpr - | type init_var_decl_list { $$ = $2; } + | type set_spec_storage init_var_decl_list { $$ = $3; } | /* empty */ { $$ = 0;