[Bug c++/13316] g++ does not follow mangling ABI for pointer to qualified member function

ian at wasabisystems dot com gcc-bugzilla@gcc.gnu.org
Mon Feb 23 18:51:00 GMT 2004


------- Additional Comments From ian at wasabisystems dot com  2004-02-23 18:51 -------
Subject: Re:  g++ does not follow mangling ABI for pointer to qualified member function

"mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> The intent of the ABI is that two member function types should be considered
> identical for substitution purposes only if they have the same argument types,
> same return types, save cv-qualification, and are members are of the same class.

Note that merely expressing that correctly will not fix this bug.

This bug is about the numbering of substitution candidates.  You are
describing an issue about when substitution candidates may be used.
That is an important issue, and it is Giovanni is talking about in his
comment in this PR.  But it is not what I am talking about in this PR.

In my example in the initial bug report, the issue is not that there
is no match for the KFivE substitution candidate.  The issue is that
KFivE substitution candidate is not being counted as a valid
substitution candidate, although the grammar clearly requires it.

You can fix this by changing the mangling ABI as I suggest, to change
the definition of <pointer-to-member-type>.  You can't fix it by
adding text to the ABI about when member function types are considered
identical for substitution purposes.

I will leave this PR closed as you assert that g++ is following the
ABI, and you are much closer to the ABI than I am.  But please do
correct the ABI to count substitution candidates correctly.

Ian


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13316



More information about the Gcc-bugs mailing list