[COMMITED][v2] manual: Remove incorrect claim that qsort() can be stabilized

Florian Weimer fweimer@redhat.com
Thu Dec 11 09:24:00 GMT 2014


On 12/11/2014 06:39 AM, Paul Eggert wrote:
> Ondřej Bílka wrote:
>> +The addresses passed to the comparison function need not correspond with
>> +the original location of the objects, and need not even lie within the
>> +original array.
>
> The last clause is incorrect.  C11 and POSIX both require that the
> addresses passed to the comparison function must point to elements of
> the original array, and glibc qsort conforms to the standards here.

Ugh, that's a new requirement in C99, isn't it?

(Although the expressions which are required to evaluate to true do not 
evaluate to false if the element lies outside the array being compared 
because they are simply undefined.)

-- 
Florian Weimer / Red Hat Product Security



More information about the Libc-alpha mailing list