This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Why Special float.h Files? (Was: Re: PATCH: XFAIL c99-float-1.c...)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]