summaryrefslogtreecommitdiffstats
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-21 16:29:58 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-21 16:29:58 +0000
commit6e03009448406dbe2bf36d8a20a1b5f21d8da2a1 (patch)
tree9a1e960bf3fcbb05dde5a7d547ebaebe89e75e97 /gcc/tree.c
parenta057b06168267962905416ba203821b3b1769b0f (diff)
downloadppe42-gcc-6e03009448406dbe2bf36d8a20a1b5f21d8da2a1.tar.gz
ppe42-gcc-6e03009448406dbe2bf36d8a20a1b5f21d8da2a1.zip
2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
PR objc/17923 * tree.c (staticp): A CONST_DECL has static storage if either TREE_STATIC or DECL_EXTERNAL is set. * c-decl.c (pushdecl_top_level): Accept CONST_DECLs which can have null names. 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu> PR objc/17923 * objc-act.c (objc_build_string_object): Create a CONST_DECL for the NeXT runtime case. 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu> PR objc/17923 * objc.dg/const-str-7.m: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89384 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index e07bd479908..b132571b5f3 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1489,6 +1489,10 @@ staticp (tree arg)
&& ! DECL_NON_ADDR_CONST_P (arg)
? arg : NULL);
+ case CONST_DECL:
+ return ((TREE_STATIC (arg) || DECL_EXTERNAL (arg))
+ ? arg : NULL);
+
case CONSTRUCTOR:
return TREE_STATIC (arg) ? arg : NULL;
OpenPOWER on IntegriCloud