Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: printf and time_t Date: Wed, 04 Feb 2026 16:04:06 -0800 Organization: None to speak of Lines: 22 Message-ID: <874inw9hu1.fsf@example.invalid> References: <10jfol6$2u6r8$1@news.xmission.com> <10jj9st$3jbe4$2@dont-email.me> <20260106200522.000015ea@yahoo.com> <87h5sy2rlb.fsf@example.invalid> <87qzs1gliq.fsf@example.invalid> <20260108012620.000041a9@yahoo.com> <87bjj5gei4.fsf@example.invalid> <20260108023846.0000260c@yahoo.com> <10jpi8h$15aea$1@dont-email.me> <20260109141859.00004f22@yahoo.com> <10jv3rb$15aea$2@dont-email.me> <20260111132015.000026ad@yahoo.com> <86zf6kkjw0.fsf@linuxsc.com> <20260111235104.00001463@yahoo.com> <86ms1pj0bc.fsf@linuxsc.com> <10ltjjt$1o4pk$1@dont-email.me> <865x8cio5y.fsf@linuxsc.com> <10lvt1s$2fu8f$1@dont-email.me> <10lvul0$2gps1$1@dont-email.me> <10m024m$2hqvi$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Thu, 05 Feb 2026 00:04:07 +0000 (UTC) Injection-Info: dont-email.me; posting-host="d063e519f8c8ebf42097b88d5c7b8b46"; logging-data="2908820"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19H8dCbRV0rLSBH0+2iOkry" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:7wJ1k0VYZG5UkbQT/VnDjSNNVvk= sha1:K+zKDM6CukDhzuV1U9j/eIYWP+k= Xref: csiph.com comp.lang.c:396602 Bart writes: [...] > Meanwhile C11 (_Generic) and C23 ("%w" formats) don't appear to have > made much impact. It's not fixing it at the right level. But at least > you can now have a 999-bit type that you probably can't print even if > you wrote "%w999d"; or can you? No, the "%wN" and "%wfN" length modifiers cannot (reliably) be used with bit-precise integer types. The standard requires them to support the widths of the types defined in , typically 8, 16, 32, and 64 bits. The standard says that "Other supported values of N are implementation-defined", but any bit-precise integer type is incompatible with any of the types. In a quick look, I don't see any standard ways to print (or read) values of bit-precise integer types, either in N3220 (C23 draft) or in N2783 (latest working draft for C202y). I find this suprising and disappointing. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */