OSDN Git Service

(HASHFUNCTION): Insure nonnegative hash even if addresses are negative.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Feb 1993 07:18:09 +0000 (07:18 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Feb 1993 07:18:09 +0000 (07:18 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3473 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/objc/objc-act.c

index 908b10d..6429dfc 100644 (file)
@@ -2973,7 +2973,7 @@ build_ivar_reference (id)
 #define HASH_ALLOC_LIST_SIZE   170
 #define ATTR_ALLOC_LIST_SIZE   170
 #define SIZEHASHTABLE          257
-#define HASHFUNCTION(key)      ((int)key >> 2)         /* divide by 4 */
+#define HASHFUNCTION(key)      ((int)key & 0x7fffffff) /* make positive */
 
 static void
 hash_init ()