Sujet : Re: Calling conventions (particularly 32-bit ARM)
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.archDate : 15. Jan 2025, 00:23:43
Autres entêtes
Organisation : None to speak of
Message-ID : <87v7uh7zeo.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Gnus/5.13 (Gnus v5.13)
scott@slp53.sl.home (Scott Lurndal) writes:
Thomas Koenig <tkoenig@netcologne.de> writes:
[...]
What I was criticising was the comittee(s) which made errno handling
for functions like sin() and cos() mandatory, and put activating
it in a globel flag.
>
It's not mandatory. It's listed as an optional extension, and
even when implemented, it's opt-in at compile time.
>
"The functionality described is optional. The functionality
described is mandated by the ISO C standard only for implementations
that define __STDC_IEC_559__."
I can't find that anywhere in ISO C or POSIX. What exactly are you
quoting? ISO C doesn't tie math_errhandling to __STDC_IEC_559__.
There's no requirement in ISO C or POSIX for an implementation to let
users affect the value of math_errhandling, at compile time or
otherwise. (And POSIX isn't directly relevant; this is all defined by
ISO C. There might be something in POSIX that goes beyond the ISO C
requirements.)
gcc has "-f[no-]fast-math" and "-f[no-]math-errno" options that can
affect the value of math_errhandling.
A conforming implementation could set math_errhandling to
(MATH_ERRNO|MATH_ERREXCEPT) and not provide a way to change it.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */