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] cp: fix location comparison in member_name_cmp


On 09/19/2017 07:25 AM, Alexander Monakov wrote:
On Tue, 19 Sep 2017, Nathan Sidwell wrote:

On 09/19/2017 07:06 AM, Alexander Monakov wrote:
Hi,

After recent changes, the member_name_cmp qsort comparator can indicate
A < B < A (i.e. lacks anti-commutativity) for distinct TYPE_DECL nodes
that have the same source location.  If their order doesn't matter, the
comparator should return 0.

Where do we get such type decls?

The first instance that tripped qsort checking for me was in PCH generation.
I think by adding

What source example generates such type decls? That you've encountered this suggests one of the invariants I was presuming is not true.

nathan

--
Nathan Sidwell


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