This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ name mangling, old and new versions?
>>>>> ak <ak@muc.de> writes:
> On Thu, Mar 05, 1998 at 04:37:33AM +0100, Jason Merrill wrote:
>> >>>>> Andi Kleen <ak@muc.de> writes:
>>
>> > I had good look with -fno-rtti -fno-exceptions together with a 2.7.2
>> > compiled Qt. The vtable layout is different when RTTI is enabled, so
>> > egcs protects against mistakes by encoding that in the mangled name.
>>
>> Both those statements are false for -fno-rtti, though they are true of
>> -fvtable-thunks.
> You mean the mangling is only changed (between -frtti/no-rtti) when
> vtable-thunks is enabled? If this is true how is the typeinfo encoded
> then when vtable-thunks is not enabled?
No. -frtti has no effect on vtable layout or mangling, ever.
-fvtable-thunks changes vtable layout and mangling.
If -fno-rtti, the RTTI entry in the vtable is set to zero, but the layout
is the same.
Jason