From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28206 invoked by alias); 10 Aug 2002 18:15:40 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 28195 invoked from network); 10 Aug 2002 18:15:39 -0000 Received: from unknown (HELO crimea.dzhan.com) (64.1.192.60) by sources.redhat.com with SMTP; 10 Aug 2002 18:15:39 -0000 Received: by crimea.dzhan.com (Postfix, from userid 1001) id 9544A22E01; Sat, 10 Aug 2002 11:27:51 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by crimea.dzhan.com (Postfix) with ESMTP id 938351D102 for ; Sat, 10 Aug 2002 11:27:51 -0700 (PDT) Date: Sat, 10 Aug 2002 11:15:00 -0000 From: Benjamin Franks To: gcc-help@gcc.gnu.org Subject: solaris8 error Message-ID: <20020810112405.M16621-100000@crimea.dzhan.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-08/txt/msg00080.txt.bz2 The following c hashing function has compiled/executed fine on various unices (linux, freebsd, some solaris versions). However, although it compiles ok on Solaris 8, it faults when it is called. Can someone familiar with Solaris weigh in on why this relatively standard hashing function (ala P.J. Weinberger) would be causing trouble on Solaris 8? This is still for a 32bit ultra1, so not a 64-bit setup, and using the gcc compiler. Thanks. ------ unsigned int hashpjw (const void *key) { const char *ptr; unsigned int val; val=0; ptr=key; while (*ptr != '\0') { int tmp; val = (val << 4) + (*ptr); if (tmp = (val & 0xf0000000)) { val = val ^ (tmp >> 24); val &= ~tmp; } ptr++; } return (val%BIG_MAX); }