This is the mail archive of the binutils@sources.redhat.com 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: pointer comparison breaks Solaris' qsort


Jakub Jelinek <jakub@redhat.com>:
> That is a Solaris bug then.
> http://www.opengroup.org/onlinepubs/009695399/functions/qsort.html

but that document also requires the comparison function be
consistent.  it's not clear to me that qsort behavior is defined
if you give it a comparison function that isn't a total ordering.
(I remember 4.2 BSD's qsort also crashed if you used rand() as a
comparison function.)

whether or not there's a bug in qsort, elflink is using qsort in
a buggy way, so it should be fixed.
--


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