[patch] change specific int128 -> generic intN

Marc Glisse marc.glisse@inria.fr
Fri May 9 00:26:00 GMT 2014


On Thu, 8 May 2014, DJ Delorie wrote:

> The libstdc++v3 headers have __int128 hard-coded all over the place.
> Any suggestions on parameterizing those for the __intN types that are
> actually supported by the target?

(adding libstdc++@ in Cc:)

The first idea that comes to mind (so possibly not such a good one) is to 
provide predefined macros:
#define __EXTENDED_INTEGER_TYPE_1__ __int24
#define __EXTENDED_INTEGER_TYPE_2__ __int128
#undef __EXTENDED_INTEGER_TYPE_3__

Assuming that the formula sizeof(type)*char_bit==precision works for all 
types, it should be sufficient for the library (abs, type_traits and 
numeric_limits).

-- 
Marc Glisse



More information about the Libstdc++ mailing list