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 08:56:10 -0800 Organization: None to speak of Lines: 30 Message-ID: <875xaq9m51.fsf@example.invalid> References: <10dajlh$ko3c$1@dont-email.me> <10fus62$hl69$1@solani.org> <10fv2dm$3can9$1@paganini.bofh.team> <10fv40v$1f7a2$1@dont-email.me> <87ms4c4bom.fsf@example.invalid> <10g08vm$1us25$1@dont-email.me> <10g1et7$2bmus$1@dont-email.me> <10g1j7h$2deh9$1@dont-email.me> <10g1qq9$2f8lb$4@dont-email.me> <10g28gm$2mf9s$1@dont-email.me> <10g2f2d$2oufq$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> <10gjqts$17nkj$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Mon, 01 Dec 2025 16:56:11 +0000 (UTC) Injection-Info: dont-email.me; posting-host="8213f2dfee378269bbe79a5548f849a1"; logging-data="1589862"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182PlOeH6tnoDcYAVZIOIs9" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:ephfy4HKz75pKRVnAVVEZZn9X9E= sha1:c74cvknVQIF3JUm5nOxC+Vp8MXI= Xref: csiph.com comp.lang.c:395636 David Brown writes: [...] > (I am not entirely sure, but I think it is standards-conforming for an > implementation to haev BITINT_MAXWIDTH set to 64 and support all > _BitInts up size 64, and then also support _BitInts of multiples of 64 > thereafter. Use of _BitInt greater than BITINT_MAXWIDTH is UB in the > standard - so an implementation can choose to give that a defined > behaviour for specific sizes.) [...] No, _BitInt(N) where N > BITINT_MAXWIDTH is a constraint violation. N3220 6.7.3.1p2 ("Constraints") : The parenthesized constant expression that follows the _BitInt keyword shall be an integer constant expression N that specifies the width (6.2.6.2) of the type. The value of N for unsigned _BitInt shall be greater than or equal to 1. The value of N for _BitInt shall be greater than or equal to 2. The value of N shall be less than or equal to the value of BITINT_MAXWIDTH (see 5.2.5.3.2). As I mentioned before, there's a proposal for C2y to allow signed _BitInt(1). Of course an implementation could do what you suggest as an extension. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */