C++ Logo


Advanced search

Subject: Re: [ub] [c++std-ext-14557] Re: Sized integer types and char bits
From: Lawrence Crowl (Lawrence_at_[hidden])
Date: 2013-10-24 18:15:05

On 10/24/13, John Regehr <regehr_at_[hidden]> wrote:
> We hacked Clang to return a random number for any undefined integer
> operation. Stuff breaks. Most of SPEC CINT breaks.

I had an earlier proposal to define the signed integer representation to be
two's complement. It died because (1) I wasn't proposing to make overflow
defined, which confused people, and (2) I wasn't aware of the two's
complement definition of the intN_t typedefs, which then made the
proposal less pressing.

> There's no way Unisys's compiler implements non-two's-complement if they
> run any substantial amount of C/C++ from the wild.

Those machines have historically been programmed in Algol. I really have
no idea how much C code they run.

Lawrence Crowl

SG12 list run by herb.sutter at gmail.com