diff options
author | Joseph Myers <jsm28@cam.ac.uk> | 2001-12-04 22:49:20 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2001-12-04 22:49:20 +0000 |
commit | d062a680ab959bc09d0f2572ac16e444b5396aa4 (patch) | |
tree | 23a8878b902f5ac60f9c00bc63521603f68218d4 /gcc/tree.c | |
parent | 69927b59f2c4b5de206b5fb336821ba8dd645e59 (diff) | |
download | gcc-d062a680ab959bc09d0f2572ac16e444b5396aa4.zip gcc-d062a680ab959bc09d0f2572ac16e444b5396aa4.tar.gz gcc-d062a680ab959bc09d0f2572ac16e444b5396aa4.tar.bz2 |
langhooks.h (struct lang_hooks): Add staticp.
* langhooks.h (struct lang_hooks): Add staticp.
* langhooks-def.h (lhd_staticp, LANG_HOOKS_STATICP): New.
(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_STATICP.
* langhooks.c (lhd_staticp): New function.
* tree.c (staticp): Call lang_hooks.staticp for language-specific
tree codes.
From-SVN: r47628
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1518,7 +1518,11 @@ staticp (arg) return staticp (TREE_OPERAND (arg, 0)); default: - return 0; + if ((unsigned int) TREE_CODE (arg) + >= (unsigned int) LAST_AND_UNUSED_TREE_CODE) + return (*lang_hooks.staticp) (arg); + else + return 0; } } |