Commit 1324c5de by Richard Kenner

(staticp): A non-nested function is always static.

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