This is the mail archive of the
mailing list for the GCC project.
Re: [cxx-abi-dev] Re: Mistake in C++ ABI substitution rules?
- From: Jim Dehnert <dehnert at transmeta dot com>
- To: Stan Shebs <shebs at apple dot com>
- Cc: Joe Buck <jbuck at synopsys dot COM>, Mark Mitchell <mark at codesourcery dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, cxx-abi-dev at codesourcery dot com
- Date: Mon, 25 Feb 2002 21:10:40 -0800
- Subject: Re: [cxx-abi-dev] Re: Mistake in C++ ABI substitution rules?
- Organization: Transmeta Corp.
- References: <200202201757.JAA23109@atrus.synopsys.com> <3C7428E7.8B513C64@transmeta.com> <3C7B0EA2.8145BB72@apple.com>
Stan Shebs wrote:
> Thanks all - the "must" interpretation seemed most sensible to me too.
I assume you've also seen Christophe's explanation, which, based on my
flaky memory, is probably correct. Re-reading this carefully, note that
the result that one gets is actually independent of whether the described
optimization has taken place -- whether or not you have taken the effort
of substituting for the components before considering a containing structure,
the decision to substitute is based on the structure having been encoded
earlier, not on whether the (partially-substituted or not) manglings are
the same. So the current wording is correct. The optimization MAY be
applied to the implementation, but will not change the mangling.
> Jim Dehnert wrote:
> > It was certainly intended as must. My mistake, probably. As Joe
> > points out, it's not portable otherwise, so there's not much choice.
> > Jim
> > Joe Buck wrote:
> > >
> > > > > "Logically, the substitutable components of a mangled name are
> > > > > considered left-to-right, components before the composite structure
> > > > > of which they are a part. If a component has been encountered
> > > > > before, it is substituted as described below. This decision is
> > > > > independent of whether its components have been substituted,
> > > > > so an implementation MAY OPTIMIZE by considering large structures
> > > > > for substitution before their components. If a component has not
> > > > > been encountered before, its mangling is identified, and it is
> > > > > added to a dictionary of substitution candidates. No entity is
> > > > > added to the dictionary twice." (emphasis mine)
> > >
> > > Mark writes:
> > > > I think that "may" should be "must".
> > >
> > > If all the folks who implemented the ABI interpreted it that way, we
> > > have no problem with s/may/must/. But if some did not, then we don't
> > > have a portable ABI, someone will have to make changes.
- Jim Dehnert firstname.lastname@example.org