Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) Date: Wed, 09 Aug 2023 00:02:42 -0700 Organization: A noiseless patient Spider Lines: 26 Message-ID: <86pm3waeb1.fsf@linuxsc.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="c08257b67d6868119c472d7304d82d93"; logging-data="4009678"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EDfs0verepCWnLVvUDxRg1sTJbPtRxtg=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:HjPkS5RK4TYWV5KzN6gNrjpEa08= sha1:y82ReRX1yswYebbd4mMg99DuO6s= Xref: csiph.com comp.lang.c:171911 arnab chatterjee writes: > Does the specification of minimum-width integer types (in > ) assure the expected integer rank hierarchy among them? No. > For example in a hypothetical system where there is no 32-bit wide > type (nor any basic type having width in the range [32, 63]) and > both int and long are 64-bit wide, is it possible for a conforming > implementation to define int_least32_t as long and int_least64_t as > int, thereby implying that int_least32_t has a higher rank than > int_least64_t? Yes, assuming what you mean by "basic types" is the standard integer types, and that this condition also applies to extended integer types. All of the types in are allowed to be extended integer types. > Same question also applies for hierarchy among the fastest > minimum-width types. Continuing with the earlier example (and > further assuming that both int and long are equally fast), is it > possible for a conforming implementation to define int_fast32_t as > long and int_fast64_t as int (inverting the expected hierarchy)? Same answer as above.