C++ Logo


Advanced search

Re: [ub] [c++std-ext-14555] Sized integer types and char bits

From: Xavier Leroy <Xavier.Leroy_at_[hidden]>
Date: Thu, 24 Oct 2013 10:06:53 +0200
On 2013-10-24 06:35, Lawrence Crowl wrote:

> Having said that, my expectation is that programmers that care about
> [signed integer representation] also care about the size of the integer.

Not necessarily. Consider all the clever arithmetic tricks from the
book _Hacker's Delight_: most are independent of integer bit-size, but
most require two's complement representation.

> In that case, int32_t et.al. require a two's complement
> representation. The programmers that care should use those
> typedefs.

But they can't because these typedefs are optional.

> Net result, no change to the standard.

And no improvements for programmers who want to write portable code.

- Xavier Leroy

Received on 2013-10-24 10:07:10