mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-02 09:28:49 +08:00
Check if symbol given for attr. cleanup is actually a function
This commit is contained in:
parent
7e901299bf
commit
c092f2ed61
8
tccgen.c
8
tccgen.c
@ -3664,7 +3664,13 @@ redo:
|
|||||||
tcc_warning("implicit declaration of function '%s'",
|
tcc_warning("implicit declaration of function '%s'",
|
||||||
get_tok_str(tok, &tokc));
|
get_tok_str(tok, &tokc));
|
||||||
s = external_global_sym(tok, &func_old_type);
|
s = external_global_sym(tok, &func_old_type);
|
||||||
}
|
}
|
||||||
|
else if ( (s->type.t & VT_BTYPE) == VT_FUNC ) {
|
||||||
|
ad->cleanup_func = s;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tcc_error("'%s' is not declared as function", get_tok_str(tok, &tokc));
|
||||||
|
}
|
||||||
ad->cleanup_func = s;
|
ad->cleanup_func = s;
|
||||||
next();
|
next();
|
||||||
skip(')');
|
skip(')');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user