From 76f912c7a1ccbd54c19070eb47026a1286b1f234 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 2 Mar 2011 22:23:24 +0900 Subject: [PATCH] Fix function typedefs. --- tools/qfcc/source/qc-parse.y | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index 0ab8a5c87..9c1adf4a6 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -400,8 +400,13 @@ external_decl { specifier_t spec = $0; $1->type = find_type (append_type ($1->type, spec.type)); - $1 = function_symbol ($1, spec.is_overload, 1); - make_function ($1, 0, $1->table->space, spec.storage); + if (spec.is_typedef) { + $1->sy_type = sy_type; + symtab_addsymbol (current_symtab, $1); + } else { + $1 = function_symbol ($1, spec.is_overload, 1); + make_function ($1, 0, $1->table->space, spec.storage); + } } ;