Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: _BitInt(N) Date: Mon, 01 Dec 2025 18:21:00 -0800 Organization: None to speak of Lines: 33 Message-ID: <87sedt39pv.fsf@example.invalid> References: <10dajlh$ko3c$1@dont-email.me> <10g2m3v$2s5sa$1@dont-email.me> <10gfkqd$19n2d$1@paganini.bofh.team> <10gftqi$3qhkg$1@dont-email.me> <87sedw9wjh.fsf@example.invalid> <10gga8k$3v646$1@dont-email.me> <10gghbg$3htol$4@dont-email.me> <10gheka$bgvr$1@dont-email.me> <10ghu7d$3htol$5@dont-email.me> <10gi0ep$i4fi$1@dont-email.me> <10gima4$1k84u$2@paganini.bofh.team> <10giq57$rn96$1@dont-email.me> <10gj4g5$1q8vh$1@paganini.bofh.team> <10gk9e7$1cggk$2@dont-email.me> <10gkbuo$1dvtp$1@dont-email.me> <10gldu9$23jf3$1@paganini.bofh.team> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 02 Dec 2025 02:21:05 +0000 (UTC) Injection-Info: dont-email.me; posting-host="275fb87d552a8a888df907db2fd45cbf"; logging-data="2013795"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BQJBQrfIRN7KuVO3thD7f" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:rVPW3L27V33wi8If1umTW2izAaI= sha1:OeusGxtr/Am8VbcUKVRavU5uJhI= Xref: csiph.com comp.lang.c:395648 antispam@fricas.org (Waldek Hebisch) writes: [...] > I see nothing in the standard that prevents '_BitInt(64)' and 'long' > to be the same type. And AFICS promotion rules are the only thing > which prevents 'uint8_t' and '_BitInt(8)' to be the same type. > Maybe I missed something, but I have read posts that appeared here > and I saw nothing indicating otherwise. My initial reaction is that *obviously* _BitInt(64) and long are distinct types. But what's obvious isn't always true. Nevertheless ... Looking through N3220 6.2.5 (Types), it specifies several groups of types: standard signed integer types, bit-precise signed integer type, extended signed integer types, and their corresponding unsigned types. It's "obvious" that these sets are meant to be disjoint, but it doesn't actually say so. But section 6.3.1.1 defines the concept of *integer conversion rank*. In particular : The rank of any standard integer type shall be greater than the rank of any extended integer type with the same width or bit-precise integer type with the same width. So even if long has a width of 64 bits and exactly the same representation as _BitInt(64), it has a greater integer conversion rank, so it can't be the same type. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */