OSDN Git Service

(staticp): Check DECL_NO_STATIC_CHAIN on nested functions.
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Mar 1996 22:16:33 +0000 (22:16 +0000)
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Mar 1996 22:16:33 +0000 (22:16 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11462 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/tree.c

index eda33bb..cfceb59 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);