(staticp, case FUNCTION_DECL): A nested function isn't static.
From-SVN: r7466
This commit is contained in:
parent
761a3df02f
commit
86270344f3
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user