From 14feeebae23fbc4a1c7b54d10e34fe8473029e6f Mon Sep 17 00:00:00 2001 From: zack Date: Sun, 30 Apr 2000 17:11:25 +0000 Subject: * cppfiles.c (redundant_include_p): Provide length of token to cpp_defined. * cpphash.c (_cpp_make_hashnode, _cpp_lookup_slot): Hash values are unsigned int. (_cpp_lookup, _cpp_lookup_slot): Do not calculate the length. (_cpp_lookup_slot): Do not calculate the hash, either. * cpphash.h: Update prototypes. * cpplib.c (do_define, do_undef, do_pragma_poison, do_assert): Hashes are unsigned int. Calculate hash here, pass by value to _cpp_lookup_slot. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33551 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cppfiles.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/cppfiles.c') diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index ddf4439ce6d..d92b84d97e0 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -132,7 +132,8 @@ redundant_include_p (pfile, ihash, ilist) included again if the string is the name of a defined macro. */ return (i->control_macro && (i->control_macro[0] == '\0' - || cpp_defined (pfile, i->control_macro, -1))) + || cpp_defined (pfile, i->control_macro, + strlen (i->control_macro)))) ? (IHASH *)-1 : i; return 0; -- cgit v1.2.1