This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] change specific int128 -> generic intN
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Fri, 9 May 2014 02:26:20 +0200 (CEST)
- Subject: Re: [patch] change specific int128 -> generic intN
- Authentication-results: sourceware.org; auth=none
- References: <201404142303 dot s3EN3ONP009938 at greed dot delorie dot com> <201405082334 dot s48NYZni001625 at greed dot delorie dot com>
- Reply-to: libstdc++ at gcc dot gnu dot org
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