Another mangling loose end

Matt Austern austern at sgi.com
Thu Mar 16 23:12:55 UTC 2000


Linkage specification is part of the type, and can be used for
overloading.  (7.5/1: "Two function types with different language
linkages are distinct types even if they are otherwise identical.")
That means they have to be mangled differently.

Example:
    typedef void (*FPTR)();
    extern "C" typedef void (*FPTR_c)();

    void f(FPTR   pf);    // These functions are overloaded on linkage
    void f(FPTR_c pf);    // specification.  They must be mangled
                          // differently.

Probably the simple solution: add linkage as a qualifier in function
types.

Issue: do we introduce mangling for C and C++ linkage only, or do
we handle other kinds of language linkage as well?

                        --Matt






More information about the cxx-abi-dev mailing list