[Info-vax] New VSI post on Youtube
Arne Vajhøj
arne at vajhoej.dk
Thu Sep 5 13:30:56 EDT 2024
On 8/14/2024 8:07 PM, Lawrence D'Oliveiro wrote:
> On Wed, 14 Aug 2024 19:58:30 -0400, Arne Vajhøj wrote:
>> I am saying that:
>>
>> default sizeof long C++ x64 <> default sizeof long C++ Itanium & Alpha
>> default sizeof pointer C++ x64 <> default sizeof pointer C++ Itanium &
>> Alpha
>>
>> and later:
>>
>> default sizeof long C++ x64 <> default sizeof long C x64
>
> This is why you have stdint.h.
Yes.
But short/int/long/long long are unfortunately very common in C/C++
code probably an order of magnitude larger than
int8_t/int16_t/int32_t/int64_t.
>> default sizeof pointer C++ x64 <> default sizeof pointer C x64
>
> Interesting ... is C++ always supposed to be ABI-compatible with C?
I don't think there is any guarantee for such compatibility. Two
different compilers are free to behave differently.
But they were compatible on Alpha and Itanium.
And I think C++ and C compilers of same origin are usually compatible
on other platforms as well.
It is practical. C++ code calling C code is quite common.
Arne
More information about the Info-vax
mailing list