Updated mangling specs

Jason Merrill jason at cygnus.com
Thu Feb 17 02:04:46 UTC 2000


dehnert at baalbek.engr.sgi.com (Jim Dehnert) writes:

> > > Also, to allow cross-.o file inlining, you need to extend that to
> > > any function (not only those explicitly marked inline.) Strictly
> > > speaking, this is outside the ABI, but unless there are strong
> > > reasons not to, I'd advocate mangling any static data, regardless of
> > > whether the function is tagged inline or not.
> > 
> > We should mangle the static data for any function that may be inlined;
> > which functions those are depends on the compiler.
> 
> I don't think that we can or should require that the static data
> always have mangled symbols emitted -- that should be the responsibility
> of an implementation that chooses to inline routines not declared
> inline.  However, once the compiler chooses to emit them, it should use
> the defined mangling for inline routines.

I'm not sure that we're disagreeing here.

If the compiler decides to inline the function in one translation
unit, and not in another, we still need to share statics between
inline and out-of-line copies.  Either we can say that the compiler
should recognize that the function might be inlined in another TU and
mangle the locals accordingly, or we can say that we should always
mangle locals.  The latter might be the only way to deal with inlining
differences between implementations...if we care.

Jason




More information about the cxx-abi-dev mailing list