From 3e29c1a88c2e9fba31e6c071b011c23b7be20622 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 5 Mar 1996 22:16:33 +0000 Subject: [PATCH] (staticp): Check DECL_NO_STATIC_CHAIN on nested functions. From-SVN: r11462 --- gcc/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree.c b/gcc/tree.c index eda33bb3541..cfceb59ad46 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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); -- 2.30.2