diff options
author | Richard Henderson <rth@redhat.com> | 2004-08-26 17:27:24 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-08-26 17:27:24 -0700 |
commit | 525c6bf5a6b91fa09f57b79bad9737ab3733601d (patch) | |
tree | 1e34e5e9ca494cf80b9eeedaeeb9ab699cb921c7 /gcc/c-common.c | |
parent | 81d1fb087780b62dbbb3994dfeeb93f76a9773cc (diff) | |
download | gcc-525c6bf5a6b91fa09f57b79bad9737ab3733601d.zip gcc-525c6bf5a6b91fa09f57b79bad9737ab3733601d.tar.gz gcc-525c6bf5a6b91fa09f57b79bad9737ab3733601d.tar.bz2 |
tree.c (staticp): Return the static object.
* tree.c (staticp): Return the static object.
* tree.h (staticp): Update decl.
* langhooks.h (struct lang_hooks): Change staticp return type to tree.
* langhooks.c (lhd_staticp): Return NULL_TREE.
* langhooks-def.h (lhd_staticp): Update decl.
* c-common.c (c_staticp): Return the static object.
* c-common.h (c_staticp): Update decl.
From-SVN: r86650
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 7e691660..8b7ee2c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -3828,13 +3828,12 @@ c_expand_expr (tree exp, rtx target, enum machine_mode tmode, /* Hook used by staticp to handle language-specific tree codes. */ -bool +tree c_staticp (tree exp) { - if (TREE_CODE (exp) == COMPOUND_LITERAL_EXPR - && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp))) - return true; - return false; + return (TREE_CODE (exp) == COMPOUND_LITERAL_EXPR + && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)) + ? exp : NULL); } |