diff options
| author | Joe Soroka <gits@joesoroka.com> | 2011-03-08 14:58:02 -0800 |
|---|---|---|
| committer | Joe Soroka <gits@joesoroka.com> | 2011-03-08 14:58:02 -0800 |
| commit | 91163f167e087c419e618186a1aa5589d9f24fde (patch) | |
| tree | 3bed691c04938462ba54658bfcb6d0fd729ffecf | |
| parent | 31fe1cc62b30e52d35dfd669dc9bc3dbb5a8ad8e (diff) | |
| download | tinycc-91163f167e087c419e618186a1aa5589d9f24fde.tar.gz tinycc-91163f167e087c419e618186a1aa5589d9f24fde.tar.bz2 | |
revert last commit. fails "make test"
test target in Makefile does not depend on tcc.
i'm not sure why, but i can think of at least one
good reason. in my local tree I have it modified
to do so, but somehow inadvertently reverted that
so when i did "make test" before committing, it
didn't actually test my changes. sorry.
| -rw-r--r-- | tccgen.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -3108,22 +3108,19 @@ static void post_type(CType *type, AttributeDef *ad) if (l == 0) l = FUNC_OLD; skip(')'); + t1 = type->t & VT_STORAGE; /* NOTE: const is ignored in returned type as it has a special meaning in gcc / C++ */ - type->t &= ~VT_CONSTANT; + type->t &= ~(VT_STORAGE | VT_CONSTANT); /* some ancient pre-K&R C allows a function to return an array and the array brackets to be put after the arguments, such - that "int c()[]" means something like "int[] c()" */ - if (tok == '[') { - next(); - skip(']'); /* only handle simple "[]" */ - type->t |= VT_PTR; - } + that "int c()[]" means the same as "int[] c()" */ + post_type(type, ad); /* we push a anonymous symbol which will contain the function prototype */ ad->func_args = arg_size; s = sym_push(SYM_FIELD, type, INT_ATTR(ad), l); s->next = first; - type->t |= VT_FUNC; + type->t = t1 | VT_FUNC; type->ref = s; } else if (tok == '[') { /* array definition */ |
