Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: uint32_t is not the same as long unsigned int ? Date: Sat, 04 Jan 2020 19:43:03 -0800 Organization: None to speak of Lines: 36 Message-ID: <87tv5amuuw.fsf@nosuchdomain.example.com> References: <87k167odry.fsf@nosuchdomain.example.com> <8736cuon1x.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="3df0afa7555d1392522deca6fbd13008"; logging-data="32298"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1B41K0Hkf258f02+1g3xa" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:Npvfha+stO5h+LCfwmYVw9MgJyI= sha1:7FwEcvnaXq5aeQGIPCEVfO5qrvw= Xref: csiph.com comp.lang.c++:71128 James Kuyper writes: > On 1/4/20 5:48 PM, Keith Thompson wrote: [...] >> You're right. N4567 3.9.1 [basic.fundamental] paragraph 3 says: >> >> The signed and unsigned integer types shall satisfy the constraints >> given in the C standard, section 5.2.4.2.1. >> >> My earlier post was based on N4842, which is a working draft for C++20 >> (and happens to be the document that I had open at the time). In that >> draft, 6.8.1 [basic.fundamental] paragraph 3 includes a table showing >> the minimum widths of the 5 signed integer types: >> >> Type Minimum width N >> signed char 8 >> short 16 >> int 16 >> long 32 >> long long 64 >> >> The widths are sufficient to specify the ranges, since unlike the >> current edition of the C++ standard, N4842 mandates 2's-complement >> for signed integers, including the extra negative value: [snip] > It hadn't occurred to me that this might be something they were planning > to change. I wonder if they're planning to change any other features > from "incorporate by reference" to "copy wording with modifications"? I don't know. In this particular case the C++ requirements are diverging from the C requirements. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com [Note updated email address] Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */