Name mangling

Jim Dehnert dehnert at baalbek.engr.sgi.com
Tue Oct 19 22:39:54 UTC 1999


This bounced from the reflector for some unknown reason.  Trying again...


>>>>> "Christophe" == Christophe de Dinechin <ddd at cup.hp.com> writes:

    Christophe> As Daveed pointed out, the throw spec should be part
    Christophe> of the function types in C++.

Hmm.  You can't overload on the throw spec, so it's not really
necessary, is it?

The point would be to avoid accidentally declaring the function
differently (in one translation unit) from the way it was defined in
another.  This is just a special case of the general ODR problem.  At
CenterLine, we built a working, but financially unsuccessful, tool to
solve this problem; it worked by adding a special section with
information about various things not covered by mangling (like the
full data layout of every type, so that you could tell if you failed
to recompile a module after changing the size of types that the
functions in that module depended upon.)

So, *in general*, I'd be inclined not to try to incorporate this kind
of information in the mangling.  Maybe the throw spec is worth putting
in the mangling, maybe not.

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

-	    Jim Dehnert		dehnert at sgi.com
				(650)933-4272




More information about the cxx-abi-dev mailing list