diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2007-04-07 00:19:46 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2007-04-07 00:19:46 +0000 |
commit | 1df918ac8ec140974275e1d976d6d828789bfaa0 (patch) | |
tree | 7fdd6d2fc0a5b2c2914e58ae503907b961d62cdd /gcc/tree.c | |
parent | 1bfe2e5fca9f4962aed93b1a1696784bf9cf1909 (diff) | |
download | gcc-1df918ac8ec140974275e1d976d6d828789bfaa0.zip gcc-1df918ac8ec140974275e1d976d6d828789bfaa0.tar.gz gcc-1df918ac8ec140974275e1d976d6d828789bfaa0.tar.bz2 |
in / 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
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):
From-SVN: r123636
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -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; } } |