This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: fegetexceptflag() question for ppc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Geoff Keating wrote:
> On powerpc, the representation is defined to be in the format of the
> FP environment register with bits other than those specified by
> 'excepts' having undefined values.
Exactly. Indicated by flags, and nothing else.
> and these are the only routines that interpret a fexcept_t. So
> there's no way a conforming program can tell that fegetexceptflag is
> returning more information than requested.
Of course there is.
If one exception is requested with fegetexceptflag and then fesetexcept
restores a more general set using fesetexceptflag, only the one
exception which fegetexceptflag returned must be set and testable via
fetestexcept after the fesetexceptflag call.
fegetexceptflag (&ex, FE_INVALID);
fesetexceptflag (&ex, FE_ALL_EXCEPT);
r = fetestexcept (FE_DIVBYZERO);
r must always be zero afterwards. This is what the other archs do and
ppc must follow.
- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/ztWh2ijCOnn/RHQRArPcAJ0eOQX8Nyt/GcsLpxXmklKIduwE2gCgou/W
Fk30B12Am7FONNiK7KRklJ8=
=WllT
-----END PGP SIGNATURE-----