diff options
| author | Joe Soroka <gits@joesoroka.com> | 2011-03-03 01:07:36 -0800 |
|---|---|---|
| committer | Joe Soroka <gits@joesoroka.com> | 2011-03-03 01:07:36 -0800 |
| commit | ce8c1886a598618446ee82c829fe8d0509934dda (patch) | |
| tree | e502af0e8a68e56af5a8acacb53919a398337220 /tccgen.c | |
| parent | 3beb38323624f871292c4e8b99d01d59bb9ab2d4 (diff) | |
| download | tinycc-ce8c1886a598618446ee82c829fe8d0509934dda.tar.gz tinycc-ce8c1886a598618446ee82c829fe8d0509934dda.tar.bz2 | |
collapse branch in decl(), making way for next patch
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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 */ |
