Commit 3e29c1a8 by Jason Merrill

(staticp): Check DECL_NO_STATIC_CHAIN on nested functions.

From-SVN: r11462
parent 38ee6ed9
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment