From e9f49ca8161bb37f950379baa52032769b87e532 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 11 Dec 2006 09:26:07 +0000 Subject: [PATCH] allow static local vars --- tools/qfcc/source/qc-parse.y | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index e0ec77db6..0564b965f 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -299,6 +299,11 @@ storage_class | SYSTEM { current_storage = st_system; } ; +local_storage_class + : LOCAL { current_storage = st_local; } + | STATIC { current_storage = st_static; } + ; + struct_defs : /* empty */ | struct_defs struct_def ';' @@ -853,7 +858,7 @@ statement pr.source_line = line; pr.source_file = file; } - | LOCAL type + | local_storage_class type { $$ = $2; local_expr = new_block_expr (); @@ -863,6 +868,7 @@ statement $$ = local_expr; local_expr = 0; (void) ($3); + current_storage = st_local; } | IF '(' fexpr ')' save_inits statement {