C++ Logo


Advanced search

Subject: Re: [ub] [c++std-ext-14555] Sized integer types and char bits
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2013-10-18 14:05:41

[Gabriel Dos Reis, c++std-ext-14555]
> My understanding of 'optional' is that the types are conditionally
> supported, and a macro in <stdint.h> indicates whether the corresponding
> type is supported.

They are a special form of conditionally supported. C99 "Exact-width integer types" /3: "These types are optional. However, if an implementation provides integer types with widths of 8, 16, 32, or 64 bits, no padding bits, and (for the signed types) that have a two's complement representation, it shall define the corresponding typedef names."

I would like to see CHAR_BIT == 8 and two's complement required. I do not want to see specific type requirements for intN_t (in fact, char is impossible because it can be either signedish or unsignedish).


SG12 list run by herb.sutter at gmail.com