mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-08 06:40:11 +08:00
fixed function type check
This commit is contained in:
parent
c42532c37d
commit
44738b516a
4
tcc.c
4
tcc.c
@ -8992,7 +8992,7 @@ static void decl(int l)
|
|||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
char buf[500];
|
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);
|
printf("type = '%s'\n", buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -9007,7 +9007,7 @@ static void decl(int l)
|
|||||||
if (tok == '{') {
|
if (tok == '{') {
|
||||||
if (l == VT_LOCAL)
|
if (l == VT_LOCAL)
|
||||||
error("cannot use local functions");
|
error("cannot use local functions");
|
||||||
if (!(type.t & VT_FUNC))
|
if ((type.t & VT_BTYPE) != VT_FUNC)
|
||||||
expect("function definition");
|
expect("function definition");
|
||||||
|
|
||||||
/* reject abstract declarators in function definition */
|
/* reject abstract declarators in function definition */
|
||||||
|
Loading…
Reference in New Issue
Block a user