<div dir="ltr">On Fri, Oct 18, 2013 at 12:05 PM, Stephan T. Lavavej <span dir="ltr"><<a href="mailto:stl@exchange.microsoft.com" target="_blank">stl@exchange.microsoft.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[Gabriel Dos Reis, c++std-ext-14555]<br>
<div class="im">> My understanding of 'optional' is that the types are conditionally<br>
> supported, and a macro in <stdint.h> indicates whether the corresponding<br>
> type is supported.<br>
<br>
</div>They are a special form of conditionally supported. C99 7.18.1.1 "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."<br>
<br>
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).</blockquote>
<div><br></div><div>And as far as I can tell, int8_t is forbidden to be char even on a system where char can represent negative numbers. The standard says that int8_t must be a "signed integer type". Even though char is an integer type that is signed on some implementations, my reading of the standard is that it is not a signed integer type. That term refers to a specific list of types and char does not appear on that list.</div>
<div><br></div><div> --Matt</div></div></div></div>