Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #171911

Re: Hierarchy among minimum-width types (and also among fastest minimum-width types)

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: Hierarchy among minimum-width types (and also among fastest minimum-width types)
Date 2023-08-09 00:02 -0700
Organization A noiseless patient Spider
Message-ID <86pm3waeb1.fsf@linuxsc.com> (permalink)
References <f0889fe7-1103-4ef4-aa36-b0f39562e364n@googlegroups.com>

Show all headers | View raw


arnab chatterjee <arnabchatterjeeofficial@gmail.com> writes:

> Does the specification of minimum-width integer types (in
> <stdint.h>) 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 <stdint.h> 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.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Hierarchy among minimum-width types (and also among fastest minimum-width types) arnab chatterjee <arnabchatterjeeofficial@gmail.com> - 2023-08-08 23:30 -0700
  Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-09 00:02 -0700
    Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) arnab chatterjee <arnabchatterjeeofficial@gmail.com> - 2023-08-09 01:00 -0700
      Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-09 15:18 +0000
        Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) arnab chatterjee <arnabchatterjeeofficial@gmail.com> - 2023-08-09 22:00 -0700
          Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) arnab chatterjee <arnabchatterjeeofficial@gmail.com> - 2023-08-09 22:38 -0700
          Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-08-12 11:53 -0700
    Re: Hierarchy among minimum-width types (and also among fastest minimum-width types) arnab chatterjee <arnabchatterjeeofficial@gmail.com> - 2023-08-09 01:04 -0700

csiph-web