Commit 86270344 by Richard Kenner

(staticp, case FUNCTION_DECL): A nested function isn't static.

From-SVN: r7466
parent 761a3df0
......@@ -1903,8 +1903,13 @@ staticp (arg)
{
switch (TREE_CODE (arg))
{
case VAR_DECL:
case FUNCTION_DECL:
/* Nested functions aren't static. Since taking their address
involves a trampoline. */
if (decl_function_context (arg) != 0)
return 0;
/* ... fall through ... */
case VAR_DECL:
return TREE_STATIC (arg) || DECL_EXTERNAL (arg);
case CONSTRUCTOR:
......
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