Another mangling issue

Matt Austern austern at sgi.com
Tue Mar 28 00:11:45 UTC 2000


We discussed this at the very end of last week's meeting, but we
should probably also raise it on the mailing list.

The mangling for X::f() (a member function with no arguments, with
arbitrary result type) is _ZN1X1fE.  The mangling for X::f (a
static member variable, of arbitrary type) is also _ZN1X1fE.

This has two disadvantages.  First, a demangler doesn't know what to
do with this mangled name.  Should it be demangled as a function, or
as a variable?  Second, we fail to detect some easily detectable ODR
violations.

I propose that we change the mangling for a function of no arguments,
and that we mangle it as a function with a single argument of type
void.  Under this proposal _ZN1X1fE would unambiguously demangle
as X::f, and the mangling for X::f() would be _ZN1X1fEv.

                        --Matt





More information about the cxx-abi-dev mailing list