diff options
| author | bellard <bellard> | 2005-09-03 21:07:35 +0000 |
|---|---|---|
| committer | bellard <bellard> | 2005-09-03 21:07:35 +0000 |
| commit | 44738b516a53b100d045a8c0f2572e76c0dbed7e (patch) | |
| tree | cbc8b4705f9e30d9fec27603f48763901f6d3da2 | |
| parent | c42532c37dc975f47c75289ec94d7cebce22c0e8 (diff) | |
| download | tinycc-44738b516a53b100d045a8c0f2572e76c0dbed7e.tar.gz tinycc-44738b516a53b100d045a8c0f2572e76c0dbed7e.tar.bz2 | |
fixed function type check
| -rw-r--r-- | tcc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |
