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 [EMAIL PROTECTED]