From patchwork Tue Sep 28 21:13:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 66026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id EA911B6EF7 for ; Wed, 29 Sep 2010 07:13:46 +1000 (EST) Received: (qmail 24706 invoked by alias); 28 Sep 2010 21:13:44 -0000 Received: (qmail 24692 invoked by uid 22791); 28 Sep 2010 21:13:43 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Sep 2010 21:13:39 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8SLDb6C019223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Sep 2010 17:13:37 -0400 Received: from greed.delorie.com (ovpn-112-30.phx2.redhat.com [10.3.112.30]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8SLDV7t011353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Sep 2010 17:13:36 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1] (may be forged)) by greed.delorie.com (8.14.3/8.14.3) with ESMTP id o8SLDT2u028108; Tue, 28 Sep 2010 17:13:29 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.3/8.14.3/Submit) id o8SLDThA028105; Tue, 28 Sep 2010 17:13:29 -0400 Date: Tue, 28 Sep 2010 17:13:29 -0400 Message-Id: <201009282113.o8SLDThA028105@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [patch] libstdc++-v3/libsupc++/hash_bytes.cc clength bug X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org m32c-elf failed to build because clength was undefined. Ok? Index: libstdc++-v3/libsupc++/hash_bytes.cc =================================================================== --- libstdc++-v3/libsupc++/hash_bytes.cc (revision 164701) +++ libstdc++-v3/libsupc++/hash_bytes.cc (working copy) @@ -169,13 +169,13 @@ namespace std // Dummy hash implementation for unusual sizeof(size_t). size_t _Hash_bytes(const void* ptr, size_t len, size_t seed) { size_t hash = seed; const char* cptr = reinterpret_cast(ptr); - for (; clength; --clength) + for (; len; --len) hash = (hash * 131) + *cptr++; return hash; } size_t _Fnv_hash_bytes(const void* ptr, size_t len, size_t seed)