From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3132 invoked by alias); 7 Sep 2009 21:58:04 -0000 Received: (qmail 3035 invoked by uid 22791); 7 Sep 2009 21:58:01 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from nschwmtas06p.mx.bigpond.com (HELO nschwmtas06p.mx.bigpond.com) (61.9.189.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Sep 2009 21:57:52 +0000 Received: from nschwotgx03p.mx.bigpond.com ([121.209.33.16]) by nschwmtas06p.mx.bigpond.com with ESMTP id <20090907215749.XGXY1920.nschwmtas06p.mx.bigpond.com@nschwotgx03p.mx.bigpond.com>; Mon, 7 Sep 2009 21:57:49 +0000 Received: from bubble.grove.modra.org ([121.209.33.16]) by nschwotgx03p.mx.bigpond.com with ESMTP id <20090907215749.HEEC1120.nschwotgx03p.mx.bigpond.com@bubble.grove.modra.org>; Mon, 7 Sep 2009 21:57:49 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 1000) id E3C6A170C881; Tue, 8 Sep 2009 07:27:48 +0930 (CST) Date: Mon, 07 Sep 2009 21:58:00 -0000 From: Alan Modra To: Andreas Schwab Cc: Tristan Gingold , Nick Clifton , Binutils Subject: Re: [Patch] opcodes/z8k-opc.h regenerated Message-ID: <20090907215748.GH518@bubble.grove.modra.org> Mail-Followup-To: Andreas Schwab , Tristan Gingold , Nick Clifton , Binutils References: <4AA1332D.9090509@redhat.com> <3323A026-B9BE-4198-90A8-B97CAF8A0683@adacore.com> <20090907111845.GC518@bubble.grove.modra.org> <20090907113743.GD518@bubble.grove.modra.org> <20090907121226.GE518@bubble.grove.modra.org> <6DE67313-3D2D-4F48-B09B-65D07ABD8F89@adacore.com> <20090907132041.GG518@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150204.4AA581DD.0072,ss=1,fgs=0 X-SIH-MSG-ID: rBkzF936TAD0zmRy0WWwOwRzyFrsq3B48Z4QWs1mqRMGT0XduMfOPpX9Y8AUgZ720y5ONxCAOWskarzmXY/YiA== X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00209.txt.bz2 On Mon, Sep 07, 2009 at 04:37:45PM +0200, Andreas Schwab wrote: > I don't think you can actually use the address as the fallback, since it > can cause two elements to be compared differently depending on the their > relative position in the array, resulting in an inconsistent sort order. The idea of using the address is to leave elements with the same key in the order they occur in the original array. That works with qsort that sorts in place, ie. doesn't copy parts of the input array to temporary storage. A qsort that copies is quite a dismal implementation, so I think we should be safe enough. -- Alan Modra Australia Development Lab, IBM