Double constructors in C++?
Mark Mitchell
mark@codesourcery.com
Tue Feb 19 02:54:00 GMT 2008
Ian Lance Taylor wrote:
> Samuel Tardieu <sam@rfc1149.net> writes:
>
>> Why are constructors included twice in object code?
>
> This is required by the C++ ABI.
>
> It is, in my opinion, a real bug that gcc does not simply merge
> identical constructors.
I agree.
Up until now, I think all of the patches have introduced additional
thunks of some kind. Actually giving both names to the same entry point
would avoid the ABI problems, and thus be non-controversial. (The ABI
explicitly endorses multiple entry points as a solution.)
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc
mailing list