From 44738b516a53b100d045a8c0f2572e76c0dbed7e Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 3 Sep 2005 21:07:35 +0000 Subject: [PATCH] fixed function type check --- tcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcc.c b/tcc.c index c281ced..25f173f 100644 --- a/tcc.c +++ b/tcc.c @@ -8992,7 +8992,7 @@ static void decl(int l) #if 0 { char buf[500]; - type_to_str(buf, sizeof(buf), t, get_tok_str(v, NULL)); + type_to_str(buf, sizeof(buf), &type, get_tok_str(v, NULL)); printf("type = '%s'\n", buf); } #endif @@ -9007,7 +9007,7 @@ static void decl(int l) if (tok == '{') { if (l == VT_LOCAL) error("cannot use local functions"); - if (!(type.t & VT_FUNC)) + if ((type.t & VT_BTYPE) != VT_FUNC) expect("function definition"); /* reject abstract declarators in function definition */