This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Supporting IEEE 754 [exceptions] (in a front end [gfortran])
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: GCC <gcc at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Sat, 29 Nov 2008 21:48:03 +0000 (UTC)
- Subject: Re: Supporting IEEE 754 [exceptions] (in a front end [gfortran])
- References: <4931A8FA.4040905@net-b.de>
On Sat, 29 Nov 2008, Tobias Burnus wrote:
> While (a) and (b) can be easily handled in the front end, I don't see
> how I can handle the rest efficiently. Most parts are provided by
> fenv.h, for which I seemingly have to write a wrapper function (in
> libgfortran) as the typedefs and constants cannot be made available in
> the front end - or have I missed something?
The typedefs and constants can also vary between multilibs (if, e.g. on
Power, different sorts of floating-point are supported on the target and
each one defines the macros to accord with the target - see
<http://www.eglibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/libc/sysdeps/powerpc/bits/fenv.h?content-type=text%2Fplain&rev=5901>
for example); I think library functions are the way to go.
> My biggest issue is that I don't see how I can compile-time evaluate the
> following - or how to evaluate it at all:
>
> if (IEEE_SUPPORT_NAN(x)) & ! should be always true (or false) on a
> given system
See MODE_HAS_NANS etc. in real.h.
--
Joseph S. Myers
joseph@codesourcery.com