On Thu, Dec 19, 2024 at 09:22:04PM +0000, Joseph Myers wrote: > On Thu, 19 Dec 2024, Andrew Pinski wrote: > > > Maybe it is better to just use _BitInt instead of __int128. Yes the > > number of targets that support _BitInt for C is less than __int128 but > > in the future _BitInt will be more supported than __int128 especially > > on 32bit targets. E.g. _BitInt(128) is supported on 32bit x86 while > > __int128 is not. > > Given the use of extern "C" in this header code, I think this target > library may be built as C++ (where we don't support _BitInt).
If it is for the library, guess one workaround could be represent it as struct with the right size/alignment and use separate C source for the actual arithmetics on it. Jakub