On Mon, May 14, 2018 at 8:37 AM, Alexander Monakov wrote:
> On Sun, 13 May 2018, H.J. Lu wrote:
>> This breaks bootstrap on Fedora 28/i686:
>>
>> https://gcc.gnu.org/ml/gcc-regression/2018-05/msg00088.html
>>
>> ../../src-trunk/gcc/sort.cc:112:5: note: in expansion of macro ‘REORDER_45’
>> RE
On Sun, 13 May 2018, H.J. Lu wrote:
> This breaks bootstrap on Fedora 28/i686:
>
> https://gcc.gnu.org/ml/gcc-regression/2018-05/msg00088.html
>
> ../../src-trunk/gcc/sort.cc:112:5: note: in expansion of macro ‘REORDER_45’
> REORDER_45 (8, 8, 0);
> ^~
> ../../src-trunk/gcc/sort.
On Thu, May 10, 2018 at 8:56 AM, Alexander Monakov wrote:
> * sort.cc: New file.
> * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
> * vec.c (qsort_chk): Use gcc_qsort.
>
This breaks bootstrap on Fedora 28/i686:
https://gcc.gnu.org/ml/gcc-regression/2018-05/msg00
On Fri, 11 May 2018, Richard Biener wrote:
> Looks good to me. As additional enhancement we might want to provide
> (even unconditionally?)
> the glibc qsort_r() interface. I remember adding various globals to
> pass down state to the comparator...
Thanks. I have no plans w.r.t qsort_r, but OTOH
On Thu, May 10, 2018 at 5:56 PM, Alexander Monakov wrote:
> * sort.cc: New file.
> * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
> * vec.c (qsort_chk): Use gcc_qsort.
Looks good to me. As additional enhancement we might want to provide
(even unconditionally?)
t
Alexander Monakov writes:
> I'm not sure. It has a weaker contract compared to qsort, and I believe
> functions in libiberty are understood to provide stronger/better replacements.
The original intent of libiberty was to provide a stronger *portability*
contract, i.e. to work around differences
On Thu, 10 May 2018, Richard Biener wrote:
>
> Just a quick first remark - how about putting this into libiberty? And then
> name it xqsort?
I'm not sure. It has a weaker contract compared to qsort, and I believe
functions in libiberty are understood to provide stronger/better replacements.
On May 10, 2018 5:56:40 PM GMT+02:00, Alexander Monakov
wrote:
> * sort.cc: New file.
>* system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
>* vec.c (qsort_chk): Use gcc_qsort.
Just a quick first remark - how about putting this into libiberty? And then
name it xqsort?
On Thu, 2018-05-10 at 18:56 +0300, Alexander Monakov wrote:
> * sort.cc: New file.
> * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
> * vec.c (qsort_chk): Use gcc_qsort.
[...snip...]
I'm not a reviewer for this, but there's a lot of fiddly implementation
logic here