[cfe-dev] BUG: complete misunterstanding of the MS-ABI

Jean-Daniel via cfe-dev cfe-dev at lists.llvm.org
Sat Sep 5 13:52:10 PDT 2020



> Le 3 sept. 2020 à 23:25, Stefan Kanthak via cfe-dev <cfe-dev at lists.llvm.org> a écrit :
> 
> "Anton Korobeynikov" <anton at korobeynikov.info> wrote:
> 
>>> Since MSVC does NOT support an (unsigned) __int128 data type, __uint128_t
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> is a user-defined type there, for which the cited specs clearly state how
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> to return it.
>>> 
>> WRONG USER INTERPRETATION:  __uint128_t is not a user-defined type.
> 
> OUCH!
> Which part of my underlined words are not understood?
> In the MS-ABI, it is an user-defined type.
> clang claims to be ABI-compatible, but it's implementations fails
> to support that claim!
> 

If MSVC does not support __int128, how could compile code that use it in the first place ? You probably define a custom type (user defined).

The fact that you choose to use an other (incompatible) type when compiling with clang (a compiler define __int128) can hardly be considered a compiler bug.

Just use the same user defined type with clang, and you will get the right behaviour.

That the kind of issue you get when defining custom type using compiler reserved name (double underscore).



More information about the cfe-dev mailing list