aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-11-15 19:28:56 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-11-15 19:28:56 -0500
commit1324c5deb7f14b9b44806c91c1589fe396fec7f9 (patch)
tree35bf35c61760d5334be4b20a8f7a62eb23876482
parentd521a02342b82d11e3a83699324af24deb57c282 (diff)
downloadgcc-1324c5deb7f14b9b44806c91c1589fe396fec7f9.zip
gcc-1324c5deb7f14b9b44806c91c1589fe396fec7f9.tar.gz
gcc-1324c5deb7f14b9b44806c91c1589fe396fec7f9.tar.bz2
(staticp): A non-nested function is always static.
From-SVN: r8451
-rw-r--r--gcc/tree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 1787d0c..d63a7a5 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1915,11 +1915,9 @@ staticp (arg)
switch (TREE_CODE (arg))
{
case FUNCTION_DECL:
- /* Nested functions aren't static. Since taking their address
+ /* Nested functions aren't static, since taking their address
involves a trampoline. */
- if (decl_function_context (arg) != 0)
- return 0;
- /* ... fall through ... */
+ return decl_function_context (arg) == 0;
case VAR_DECL:
return TREE_STATIC (arg) || DECL_EXTERNAL (arg);