From 632ee5a54076d417971ae7fa8a0c154441a71499 Mon Sep 17 00:00:00 2001 From: grischka Date: Tue, 15 Jun 2010 17:03:23 +0200 Subject: [PATCH] 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)(); ... } --- tccgen.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tccgen.c b/tccgen.c index 5c5f26e7..9d57ecdd 100644 --- a/tccgen.c +++ b/tccgen.c @@ -2995,9 +2995,6 @@ static void post_type(CType *type, AttributeDef *ad) if (tok == '(') { /* function declaration */ - if ((type->t & VT_STATIC) && local_stack) { - error("Function without file scope cannot be static"); - } next(); l = 0; first = NULL;