C++ Logo


Advanced search

Subject: Re: [ub] [c++std-ext-14555] Sized integer types and char bits
From: Xavier Leroy (Xavier.Leroy_at_[hidden])
Date: 2013-10-21 06:49:32

On 2013-10-20 19:36, Gabriel Dos Reis wrote:
> b. It is not clear that the support for one's complement or sign-magnitude
> adds a substantial complication, or that a substantial simplification
> of the standards specification is to be gained from introducing that
> requirement. For example, I don't think support for these binary
> representation would stop us from modifying the specification of
> signed integer arithmetic overflow -- my take-away from the Chicago
> meeting was that defining that be wrapping will be a very terrible idea
> would meet opposition.

I understand that signed integer overflow is a hot issue and wasn't
expecting drastic changes in this department.

The kind of simplifications I had in mind is, for instance, the
specification of bitwise operators (~ & | ^ and shifts) over signed
integers, which is both complicated and imprecise in the current
standards, and would become simpler and fully specified if two's
complement was mandated.

- Xavier

SG12 list run by herb.sutter at gmail.com