This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: <bits/features.h> setting of __STDC_IEC_559__ not universallyaccurate
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 29 Mar 2005 13:35:00 +0000 (UTC)
- Subject: Re: <bits/features.h> setting of __STDC_IEC_559__ not universallyaccurate
- References: <42489BD2.5040407@codesourcery.com>
On Mon, 28 Mar 2005, Mark Mitchell wrote:
> Ideally, the software floating-point emulation would indeed provide full IEC
> 559 conformance. And, as the CONFORMANCE file indicates, __STDC_IEC_559__
> should really be defined by the compiler, so that it is set throughout the
> entire translation unit.
It and other such macros should be set throughout the translation unit -
to a value depending on the library, not just the compiler, though passing
some of the flags included in -ffast-math should probably disable defining
this macro. (This is most significant for __STDC_ISO_10646__, the value
of which may depend on the precise library version.) My proposal for such
definitions is to have a separate header <stdc-macros.h> which defines
these macros - but does not include <features.h> itself - which the
compiler would preinclude at the start of each translation unit if it
exists, and which <features.h> would include for the sake of older
compilers.
--
Joseph S. Myers
joseph@codesourcery.com