This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] change specific int128 -> generic intN


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]