History

Revert "Complain for static fct declared w/o file scope"

This reverts commit e9406c09a3212ab3f120412a6bbdacb0cdd25deb. We don't want errors for static local function pointers, such as: { static void (*fn)(); ... }

grischka committed 16 years ago

Commit 632ee5a1 parent 10b48021 file · +0 −3Browse files

Unified · Split

tccgen.c+0−3
@@ -2995,9 +2995,6 @@ static void post_type(CType *type, AttributeDef *ad) · 2994 unmodified lines
2995 2995
2996 if (tok == '(') {2996 if (tok == '(') {
2997 /* function declaration */2997 /* function declaration */
2998 if ((type->t & VT_STATIC) && local_stack) {
2999 error("Function without file scope cannot be static");
3000 }
3001 next();2998 next();
3002 l = 0;2999 l = 0;
3003 first = NULL;3000 first = NULL;

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