This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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][middle-end] Make qsort in tree-ssa-sccvn.c stable.


> Unstability is only given when the comparison returns 0 for any other
> cases besides pointer equality. ÂIt could have been recoded by an a priori
> check for pa==pb, in which case it could be replaced by an
> gcc_unreachable, which indeed might be more clear.

True. Doing

gcc_assert (pa == pb);
return 0;

in the last else should be fine too.

>
> Ciao,
> Michael.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047


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