From e19f7e352128512fe546b898b8e29fa82cd27f72 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 11 Feb 2011 14:40:26 +0900 Subject: [PATCH] Sort out the parameters for QC style functions :) --- tools/qfcc/include/type.h | 1 + tools/qfcc/source/qc-parse.y | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/include/type.h b/tools/qfcc/include/type.h index 2ad7c387c..7339e53b5 100644 --- a/tools/qfcc/include/type.h +++ b/tools/qfcc/include/type.h @@ -79,6 +79,7 @@ typedef struct type_s { typedef struct { type_t *type; + struct param_s *params; storage_class_t storage; unsigned multi_type:1; unsigned multi_store:1; diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index 975f01921..4e6fa738e 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -207,7 +207,6 @@ int yylex (void); %{ function_t *current_func; -param_t *current_params; class_type_t *current_class; expr_t *local_expr; vis_e current_visibility; @@ -313,6 +312,7 @@ external_def $$ = $1; // copy spec bits and storage $$.type = parse_params ($1.type, $2), st_global, 0; $$.type = find_type ($$.type); + $$.params = $2; } function_def_list | optional_specifiers function_decl function_body @@ -760,7 +760,7 @@ overloaded_identifier : identifier { $$ = $1; - $$->params = current_params; + $$->params = $0.params; $$->type = $0.type; $$ = function_symbol ($$, $0.is_overload, 1); }