Path: csiph.com!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.std.c Subject: C23: asctime is obsolescent Date: Wed, 23 Nov 2022 18:12:10 -0800 Organization: None to speak of Lines: 20 Message-ID: <875yf5ksn9.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="079eca72679106f8d66c2d24ea4d1c39"; logging-data="525917"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kUg4sX1jUBQaaj25fiQOJ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:EiLHJsCQ717zUudfn2AYrW5URTM= sha1:08vEX3RU/NqhHz0gEr1+3sydC7Q= Xref: csiph.com comp.std.c:6456 In the latest C23 draft: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf the descriptions of the __DATE__ and __TIME__ macros refer to the asctime() function. That's not new. What's new is that asctime() is deprecated. Referring to a deprecated function isn't really a problem, but if asctime() is actually removed in a future standard the descriptions of __DATE__ and __TIME__ will need to be updated. It would also be nice to have a new macro that expands to the current date in the form "YYYY-MM-DD". I do not suggest changing the behavior of __DATE__, but perhaps something like __ISODATE__ could be added. Question: If this is done, should __DATE__ be deprecated? -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for XCOM Labs void Void(void) { Void(); } /* The recursive call of the void */