This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Why Special float.h Files? (Was: Re: PATCH: XFAIL c99-float-1.c...)
- To: Jeffrey Oldham <oldham at codesourcery dot com>
- Subject: Re: Why Special float.h Files? (Was: Re: PATCH: XFAIL c99-float-1.c...)
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Wed, 31 Jan 2001 18:09:59 +0000 (GMT)
- cc: <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
On Wed, 31 Jan 2001, Jeffrey Oldham wrote:
> 1) How do we ensure that gcc's float.h are consistent with the
> underlying system since the underlying system can change without
> warning us? Do I just guess correct values?
You don't guess values. The ISO C standard defines the contents of this
header; you read the specification, and the specification of the floating
point format for your architecture (either in the CPU manual, or deferred
to IEEE 754 / IEC 60559), and compute the correct values and enter them in
the file. enquire.c may generate the non-C99 parts of the file, but the
results should still be checked - including making sure that the binary
value compiled for decimal constants in the source file has the exact bits
the minimal / maximal normalized floating point values should have.
For many systems (those using only 32-bit and 64-bit IEEE format),
float-i64.h suffices - someone with the IEEE floating point standard
should add the C99 values to it.
--
Joseph S. Myers
jsm28@cam.ac.uk