(staticp): Check DECL_NO_STATIC_CHAIN on nested functions.
authorJason Merrill <merrill@gnu.org>
Tue, 5 Mar 1996 22:16:33 +0000 (22:16 +0000)
committerJason Merrill <merrill@gnu.org>
Tue, 5 Mar 1996 22:16:33 +0000 (22:16 +0000)
From-SVN: r11462

gcc/tree.c

index eda33bb3541c5b0048aa47249075b465eb035eaf..cfceb59ad466b859607ba9af47b4a89d29456a9d 100644 (file)
@@ -2055,7 +2055,7 @@ staticp (arg)
     case FUNCTION_DECL:
       /* Nested functions aren't static, since taking their address
         involves a trampoline.  */
-       return decl_function_context (arg) == 0;
+       return decl_function_context (arg) == 0 || DECL_NO_STATIC_CHAIN (arg);
     case VAR_DECL:
       return TREE_STATIC (arg) || DECL_EXTERNAL (arg);