Getting glibfortran to build on newlib targets aka. missing stdint.h (PR 14325)

Joseph S. Myers joseph@codesourcery.com
Mon Nov 8 00:56:00 GMT 2004


On Sun, 7 Nov 2004, Zack Weinberg wrote:

> In particular I do not think we should fix a non-C99 conformant
> system-provided float.h, and I am dubious about continuing to

If we don't fix it, then we regress in that regard.  Now, I follow a very 
wide definition of what counts as a regression, but the fix is at least a 
simple one of adding

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#undef FLT_EVAL_METHOD
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#endif

to a system float.h that doesn't define FLT_EVAL_METHOD, and likewise for 
DECIMAL_DIG.

> I agree that stdbool.h and iso646.h are unlikely to cause trouble
> either way, but I would still put them in include-freestanding,
> allowing a C library to override.  And I'd like it to be possible to
> put stddef.h there too.

The problem with <stddef.h> is really the definition of offsetof, though 
the C++ definition of NULL to __null comes into things as well, since by 
design our types should always agree with those of the system header.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)



More information about the Gcc mailing list