diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-07 00:19:46 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-07 00:19:46 +0000 |
commit | 57d1a3081cac2268625f3c8e5629d10a6427309e (patch) | |
tree | 7fdd6d2fc0a5b2c2914e58ae503907b961d62cdd /gcc/tree.c | |
parent | fc4923fee62551632b917151cd233983215ad12d (diff) | |
download | gcc-57d1a3081cac2268625f3c8e5629d10a6427309e.tar.gz |
in /
2007-04-06 Daniel Berlin <dberlin@dberlin.org>
* tree.c (staticp): No longer use staticp langhook.
* langhooks.c (lhd_staticp): Removed.
* langhooks.h (struct lang_hooks): Remove staticp.
* c-common.c (c_staticp): Remove.
* c-common.h (c_staticp): Ditto.
* langhooks-defs.h (lhd_staticp): Ditto.
(LHD_HOOKS_STATICP): Ditto
* tree.h (gcc_assert_lowered): New macro.
in cp/
2007-04-06 Daniel Berlin <dberlin@dberlin.org>
* cp-objcp-common.c (cxx_staticp): Remove.
* cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
* cp-tree.h (cxx_staticp):
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123636 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 0ea18b2f700..816275c1f68 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1986,10 +1986,7 @@ staticp (tree arg) return arg; case COMPONENT_REF: - /* If the thing being referenced is not a field, then it is - something language specific. */ - if (TREE_CODE (TREE_OPERAND (arg, 1)) != FIELD_DECL) - return (*lang_hooks.staticp) (arg); + gcc_assert (TREE_CODE (TREE_OPERAND (arg, 1)) == FIELD_DECL); /* If we are referencing a bitfield, we can't evaluate an ADDR_EXPR at compile time and so it isn't a constant. */ @@ -2015,11 +2012,10 @@ staticp (tree arg) return false; default: - if ((unsigned int) TREE_CODE (arg) - >= (unsigned int) LAST_AND_UNUSED_TREE_CODE) - return lang_hooks.staticp (arg); - else - return NULL; + /* All language specific tree codes should have been lowered by + now. */ + gcc_assert_lowered (arg); + return NULL; } } |