This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] opcodes/z8k-opc.h regenerated


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]