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
29952995
29962996 if (tok == '(') {
29972997 /* function declaration */
2998− if ((type->t & VT_STATIC) && local_stack) {
2999− error("Function without file scope cannot be static");
3000− }
30012998 next();
30022999 l = 0;
30033000 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