Unified · Split
| @@ -3664,7 +3664,13 @@ redo: · 3663 unmodified lines | ||
| 3664 | 3664 | tcc_warning("implicit declaration of function '%s'", |
| 3665 | 3665 | get_tok_str(tok, &tokc)); |
| 3666 | 3666 | s = external_global_sym(tok, &func_old_type); |
| 3667 | − } | |
| 3667 | + } | |
| 3668 | + else if ( (s->type.t & VT_BTYPE) == VT_FUNC ) { | |
| 3669 | + ad->cleanup_func = s; | |
| 3670 | + } | |
| 3671 | + else { | |
| 3672 | + tcc_error("'%s' is not declared as function", get_tok_str(tok, &tokc)); | |
| 3673 | + } | |
| 3668 | 3674 | ad->cleanup_func = s; |
| 3669 | 3675 | next(); |
| 3670 | 3676 | skip(')'); |