OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec8cc42
)
(staticp, case FUNCTION_DECL): A nested function isn't static.
author
kenner
<kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Jun 1994 21:44:58 +0000
(21:44 +0000)
committer
kenner
<kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Jun 1994 21:44:58 +0000
(21:44 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7466
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/tree.c
patch
|
blob
|
history
diff --git
a/gcc/tree.c
b/gcc/tree.c
index
6e15640
..
1839b31
100644
(file)
--- a/
gcc/tree.c
+++ b/
gcc/tree.c
@@
-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: