<bits/features.h> setting of __STDC_IEC_559__ not universally accurate
Joseph S. Myers
joseph@codesourcery.com
Tue Mar 29 13:35:00 GMT 2005
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
More information about the Libc-alpha
mailing list