Groups | Search | Server Info | Login | Register
Groups > comp.lang.c > #396732
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: printf and time_t |
| Date | 2026-03-02 18:04 -0800 |
| Organization | None to speak of |
| Message-ID | <871pi1llcy.fsf@example.invalid> (permalink) |
| References | (2 earlier) <10jgc2t$2rp4s$2@nntp.eternal-september.org> <86o6n5pocw.fsf@linuxsc.com> <10jm6se$r6nl$1@dont-email.me> <864imyg0im.fsf@linuxsc.com> <10o54de$1i30i$1@dont-email.me> |
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
[...]
>> Besides all of that, _Imaginary types don't satisify the condition
>> for time_t to be an arithmetic type. Annex G says the imaginary
>> types are floating types, but in C99 Annex G is informative, not
>> normative.
>
> True, but if _Imaginary types are supported by an implementation, Annex
> G describes what it is that is being supported. I don't see a problem,
> though I'm sure that you do.
> I hadn't remembered that the imaginary types were removed from the draft
> version of C202X. They were still present in n3220.pdf, dated 2024. In
> that version, Annex G (which describes imaginary types) is described as
> normative. 7.3.1p6 indicates that they were optional in that version.
> However, if they were supported, they did meet the requirements of an
> arithmetic type.
I don't have the official ISO C23 standard, but I understand
that N3220 is quite close to it. In that draft, and I believe
in the actual standard, Annex G is normative but optional.
Implementations are not required to support it unless they
define __STDC_IEC_559_COMPLEX__. (C23 changes the macro
name to __STDC_IEC_60559_COMPLEX__ and makes the name
__STDC_IEC_559_COMPLEX__ obsolescent.)
C11 and C17 are similar.
(As of C23, Annex G still says "There is a new keyword _Imaginary".
It's hardly new; it goes back to C99.)
As I understand it, a conforming implementation that defines
__STDC_IEC_559_COMPLEX__ or __STDC_IEC_60559_COMPLEX__ *must*
implement both complex and imaginary types. Neither gcc nor clang
does so.
C2y completely drops support for imaginary types.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Find similar
Re: printf and time_t Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-07 05:02 -0800
Re: printf and time_t "James Russell Kuyper Jr." <jameskuyper@alumni.caltech.edu> - 2026-01-07 12:58 -0500
Re: printf and time_t Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-01 23:21 -0800
Re: printf and time_t Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-02 03:37 -0800
Re: printf and time_t James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-02 17:53 -0500
Re: printf and time_t Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-02 18:04 -0800
csiph-web