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: Tue, 03 Feb 2026 14:43:46 -0800 Organization: None to speak of Lines: 19 Message-ID: <87zf5pphwd.fsf@example.invalid> References: <10jfol6$2u6r8$1@news.xmission.com> <20260105105138.00005f0a@yahoo.com> <10jgbp7$2vdjt$1@news.xmission.com> <10jgdu9$2t8dh$1@nntp.eternal-september.org> <10jhkso$3c9r2$3@nntp.eternal-september.org> <20260106112938.00004446@yahoo.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> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 03 Feb 2026 22:43:47 +0000 (UTC) Injection-Info: dont-email.me; posting-host="84306e1f977f13f562ce5f77da7c7ef4"; logging-data="1980658"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0d0OCazT1bevmTHXYaQxC" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:LKDk8gVUvM4j1s/PpYlGBEI0Xnc= sha1:FBZ2ZdoIVow0Zr7XjAGB8nxCfEI= Xref: csiph.com comp.lang.c:396579 Tim Rentsch writes: [...] > If variable 'u' is declared as uint32_t, a way to print it that is > easy and also type-safe is > > printf( " u is %lu\n", u+0LU ); I prefer printf("u is %lu\n", (unsigned)long_u); I find it clearer. Anticipating your reply, this is my personal preference, my opinion, not backed up by any objective research. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */