aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-10-21 16:29:58 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-10-21 09:29:58 -0700
commit943db34743ced34d1e17686611bc6156a9087b7b (patch)
tree9a1e960bf3fcbb05dde5a7d547ebaebe89e75e97 /gcc/tree.c
parent5bee567d896ebb2d4ed1e636855b7e2f71832d54 (diff)
downloadgcc-943db34743ced34d1e17686611bc6156a9087b7b.zip
gcc-943db34743ced34d1e17686611bc6156a9087b7b.tar.gz
gcc-943db34743ced34d1e17686611bc6156a9087b7b.tar.bz2
re PR objc/17923 (const-str-[34].m fails on the mainline (next runtime))
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. From-SVN: r89384
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 e07bd47..b132571 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;