diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-22 07:23:37 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-22 07:23:37 +0000 |
commit | 17822ef8b47e893b11a7e32bc82a23339501412c (patch) | |
tree | 04db4302bc987e3271205fe750e45aff9855d0e2 /gcc/stringpool.c | |
parent | 91bcfcfd091ba5e20f4a9d6d62fecae1bd00457c (diff) | |
download | gcc-17822ef8b47e893b11a7e32bc82a23339501412c.tar.gz |
* c-lex.c (c_lex): Just cast cpp's hashnode to gcc's one.
* stringpool.c: (IS_FE_IDENT, make_identifier): Delete.
(maybe_get_identifier): Update.
* tree.h (make_identifier): Delete.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stringpool.c')
-rw-r--r-- | gcc/stringpool.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/gcc/stringpool.c b/gcc/stringpool.c index 0828bc0435e..7abca36b30c 100644 --- a/gcc/stringpool.c +++ b/gcc/stringpool.c @@ -35,8 +35,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "flags.h" #include "toplev.h" -#define IS_FE_IDENT(NODE) (TREE_CODE (NODE) == IDENTIFIER_NODE) - /* The "" allocated string. */ const char empty_string[] = ""; @@ -99,23 +97,6 @@ ggc_alloc_string (contents, length) return obstack_finish (&string_stack); } -/* NODE is an identifier known to the preprocessor. Make it known to - the front ends as well. */ - -void -make_identifier (node) - tree node; -{ - /* If this identifier is longer than the clash-warning length, - do a brute force search of the entire table for clashes. */ - if (warn_id_clash && do_identifier_warnings - && IDENTIFIER_LENGTH (node) >= id_clash_len) - ht_forall (ident_hash, (ht_cb) scan_for_clashes, - IDENTIFIER_POINTER (node)); - - TREE_SET_CODE (node, IDENTIFIER_NODE); -} - /* Return an IDENTIFIER_NODE whose name is TEXT (a null-terminated string). If an identifier with that name has previously been referred to, the same node is returned this time. */ @@ -141,17 +122,11 @@ maybe_get_identifier (text) const char *text; { hashnode ht_node; - tree node; - size_t length = strlen (text); ht_node = ht_lookup (ident_hash, (const unsigned char *) text, - length, HT_NO_INSERT); + strlen (text), HT_NO_INSERT); if (ht_node) - { - node = HT_IDENT_TO_GCC_IDENT (ht_node); - if (IS_FE_IDENT (node)) - return node; - } + return HT_IDENT_TO_GCC_IDENT (ht_node); return NULL_TREE; } @@ -167,8 +142,7 @@ scan_for_clashes (pfile, h, text) { tree node = HT_IDENT_TO_GCC_IDENT (h); - if (IS_FE_IDENT (node) - && IDENTIFIER_LENGTH (node) >= id_clash_len + if (IDENTIFIER_LENGTH (node) >= id_clash_len && !memcmp (IDENTIFIER_POINTER (node), text, id_clash_len)) { warning ("\"%s\" and \"%s\" identical in first %d characters", |