This is the mail archive of the gcc@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: [cxx-abi-dev] Re: A complexity in the mangling ABI


Ian Lance Taylor wrote:
Carlo Wood <carlo@alinoe.com> writes:


I agree that this is a lack in the ABI that cannot be solved
by the demangler - lets just hope that the compiler WILL add
a substitution for every order-insensitive vendor qualifier,
unlike what the ABI says - otherwise all demanglers will break.
If they do that, then there is no problem.

I agree, and my feeling is that the best resolution would be for the ABI to change to encourage compilers to behave this way.

What I recall the ABI intended to convey, though obviously it isn't clear enough, was that order-insensitive vendor qualifiers were to be treated just like the predefined qualifiers const and volatile. That is, the substitutions permitted are two: one for the bare type, and one for the final type with all of its order-insensitive qualifiers.

We did not want to "waste" substitutions on the intermediate
qualifications, and wanted to avoid multiple substitutions for
different orderings of order-indifferent sets of qualifiers.

Order-sensitive qualifiers present a significant complication.
I don't recall clearly, but I think our intent was just to avoid
substituting them entirely to avoid any ambiguity.  One would
therefore end up with a substitution for the bare type, and
explicit qualifiers.  Perhaps others that were involved have
a clearer recollection, though.

Jim



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