summaryrefslogtreecommitdiffstats
path: root/gcc/hashtable.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-10 22:34:03 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-10 22:34:03 +0000
commit66a5287e74f3ae963d4701edd9072578adb6ef12 (patch)
tree68c8a29210b56a578f8917368423b34eaeea5d60 /gcc/hashtable.c
parent4ba5867e676ca85ae7c379ffe4e65a827aedbc2c (diff)
downloadppe42-gcc-66a5287e74f3ae963d4701edd9072578adb6ef12.tar.gz
ppe42-gcc-66a5287e74f3ae963d4701edd9072578adb6ef12.zip
* cpplex.c (parse_identifier): Fast-path optimize. Avoid
copying identifier when we're just going to throw it away. (parse_identifier_slow): New routine to handle abnormal cases. (_cpp_lex_token): Update call site. * hashtable.c (ht_lookup): Don't assume that the string we've been given is NUL-terminated. * system.h: #define __builtin_expect(a, b) to (a) if not GCC >=3.0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45529 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hashtable.c')
-rw-r--r--gcc/hashtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/hashtable.c b/gcc/hashtable.c
index 7d0359a2c61..bd2b13727bb 100644
--- a/gcc/hashtable.c
+++ b/gcc/hashtable.c
@@ -162,7 +162,7 @@ ht_lookup (table, str, len, insert)
HT_LEN (node) = len;
if (insert == HT_ALLOC)
- HT_STR (node) = obstack_copy (&table->stack, str, len + 1);
+ HT_STR (node) = obstack_copy0 (&table->stack, str, len);
else
HT_STR (node) = str;
OpenPOWER on IntegriCloud