[PATCH 6/6] qsort comparator consistency checking
Alexander Monakov
amonakov@ispras.ru
Thu Aug 3 14:25:00 GMT 2017
On Wed, 2 Aug 2017, Jeff Law wrote:
> >> Well, there's not *that* many qsort calls. My quick grep shows 94 and
> >> its a very mechanical change. Then a poison in system.h to ensure raw
> >> calls to qsort don't return.
Note that poisoning qsort outlaws vec::qsort too; it would need to be mass-
renamed as well (to vec::sort, presumably). It seems there are 83 or more
calls to vec::qsort.
> > Any suggestion for the non-poisoned replacement? xqsort? gcc_qsort?
> qsort_chk/qsort_nochk for checked and non-checked?
I believe qsort_chk isn't appropriate, checking is not explicitly a part
of interface, and we never use _chk in potentially-checking tree and RTL
accessors either.
Thanks.
Alexander
More information about the Gcc-patches
mailing list