Further floating-point-emulator cleanups
Zack Weinberg
zack@codesourcery.com
Sat Mar 23 14:25:00 GMT 2002
On Sat, Mar 23, 2002 at 09:46:50AM -0500, Kaveh R. Ghazi wrote:
>
> > # 1071 "../../egcc-CVS20020323/gcc/libgcc2.c"
> > # 1 "/usr/include/float.h" 1 3 4
> > # 16 "/usr/include/float.h" 3 4
> > #pragma ident "@(#)float.h 1.15 97/11/22 SMI"
> > # 25 "/usr/include/float.h" 3 4
> > extern bogus_type __flt_rounds(void);
> > # 1072 "../../egcc-CVS20020323/gcc/libgcc2.c" 2
>
> "int" is defined to "bogus_type" by libgcc2.h because one isn't
> supposed to be using the "normal C language built-in type names" at
> that point in the file.
It makes most sense, I think, to push the include of float.h all the
way up into tsystem.h. Can you try this patch?
zw
* tsystem.h: Include float.h here...
* libgcc2.c: ... not here.
===================================================================
Index: tsystem.h
--- tsystem.h 2001/10/09 14:03:13 1.6
+++ tsystem.h 2002/03/23 18:03:07
@@ -33,8 +33,9 @@ Software Foundation, 59 Temple Place - S
#define HAVE_DECL_GETOPT 1
#endif
-/* GCC supplies this header. */
+/* GCC supplies these headers. */
#include <stddef.h>
+#include <float.h>
#ifdef inhibit_libc
===================================================================
Index: libgcc2.c
--- libgcc2.c 2002/03/23 01:10:30 1.134
+++ libgcc2.c 2002/03/23 18:03:08
@@ -1065,11 +1065,8 @@ __floatdidf (DWtype u)
#define WORD_SIZE (sizeof (Wtype) * BITS_PER_UNIT)
#define HIGH_HALFWORD_COEFF (((UDWtype) 1) << (WORD_SIZE / 2))
#define HIGH_WORD_COEFF (((UDWtype) 1) << WORD_SIZE)
+
#define DI_SIZE (sizeof (DWtype) * BITS_PER_UNIT)
-
-/* GCC guarantees this header exists at this point. */
-#include <float.h>
-
#define DF_SIZE DBL_MANT_DIG
#define SF_SIZE FLT_MANT_DIG
More information about the Gcc-bugs
mailing list