From ce8c1886a598618446ee82c829fe8d0509934dda Mon Sep 17 00:00:00 2001 From: Joe Soroka Date: Thu, 3 Mar 2011 01:07:36 -0800 Subject: [PATCH] collapse branch in decl(), making way for next patch --- tccgen.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tccgen.c b/tccgen.c index d77e48cd..22d58ecd 100644 --- a/tccgen.c +++ b/tccgen.c @@ -5560,21 +5560,21 @@ ST_FUNC void decl(int l) /* XXX: test storage specifiers ? */ sym = sym_push(v, &type, INT_ATTR(&ad), 0); sym->type.t |= VT_TYPEDEF; - } else if ((type.t & VT_BTYPE) == VT_FUNC) { - /* external function definition */ - /* specific case for func_call attribute */ - type.ref->r = INT_ATTR(&ad); - external_sym(v, &type, 0, asm_label); } else { - /* not lvalue if array */ r = 0; - if (!(type.t & VT_ARRAY)) + if ((type.t & VT_BTYPE) == VT_FUNC) { + /* external function definition */ + /* specific case for func_call attribute */ + type.ref->r = INT_ATTR(&ad); + } else if (!(type.t & VT_ARRAY)) { + /* not lvalue if array */ r |= lvalue_type(type.t); + } has_init = (tok == '='); - if ((btype.t & VT_EXTERN) || + if ((btype.t & VT_EXTERN) || ((type.t & VT_BTYPE) == VT_FUNC) || ((type.t & VT_ARRAY) && (type.t & VT_STATIC) && !has_init && l == VT_CONST && type.ref->c < 0)) { - /* external variable */ + /* external variable or function */ /* NOTE: as GCC, uninitialized global static arrays of null size are considered as extern */ -- 2.11.4.GIT