This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Results from Intel4s C++ ABI Testsuite
- From: Joe Buck <Joe dot Buck at synopsys dot com>
- To: rth at redhat dot com (Richard Henderson)
- Cc: nick at ing-simmons dot net (Nick Ing-Simmons), mark at codesourcery dot com,gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org),joe dot goodman at intel dot com (Goodman Joe),nathan at codesourcery dot com (Nathan Sidwell),Joe dot Buck at synopsys dot COM (Joe Buck), aj at suse dot de (Andreas Jaeger)
- Date: Mon, 22 Jul 2002 09:34:37 -0700 (PDT)
- Subject: Re: Results from Intel4s C++ ABI Testsuite
> On Sat, Jul 20, 2002 at 10:05:01AM +0100, Nick Ing-Simmons wrote:
> > It seems to me (as a casual reader who does not use C++ much),
> > that the fact that "type safe linkage" is encoding the "name" of the
> > type rather than the "type" is sub-optimal. If what was encoded
> > was "unsigned integer of 32-bits" then the two size_t-s would match.
>
> Unfurtunately, C++ allows a function to be overloaded based on
> the type, and thus the mangling scheme must allow both f(int)
> and f(long) to exist. Which would not be possible if the mangling
> were done based on width.
The problem could have been avoided by going in the other direction and
making size_t a true type rather than a typedef in C++, and in fact, C++
did this with wchar_t.