History

Check if symbol given for attr. cleanup is actually a function

Udo committed 6 years ago

Commit c092f2e1 parent 7e901291 file · +7 −1Browse files

Unified · Split

tccgen.c+7−1
@@ -3664,7 +3664,13 @@ redo: · 3663 unmodified lines
3664 tcc_warning("implicit declaration of function '%s'",3664 tcc_warning("implicit declaration of function '%s'",
3665 get_tok_str(tok, &tokc));3665 get_tok_str(tok, &tokc));
3666 s = external_global_sym(tok, &func_old_type);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 ad->cleanup_func = s;3674 ad->cleanup_func = s;
3669 next();3675 next();
3670 skip(')');3676 skip(')');

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t