[Bug c/54750] New: conflicting float.h on windows using mingw

p.obry at wanadoo dot fr gcc-bugzilla@gcc.gnu.org
Sat Sep 29 12:42:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54750

             Bug #: 54750
           Summary: conflicting float.h on windows using mingw
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: p.obry@wanadoo.fr


Since 2010 if I remember correctly (and there was previous discussion about
this on the GCC patch maling-list) there is a conflict with float.h from GCC
and the one from mingw.

Two patches were proposed long time ago to fix this issue. One on GCC tree and
one on MingW tree. At this time the mingw64 project has patched the float.h to
cooperate with GCC's one.

See r2987 from mingw64 subversion tree.

http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-headers/crt/float.h?r1=2986&r2=2987

So starting with GCC 4.6 it is possible to fix the build issue by just
applying the following simple patch. This is what we do since GCC 4.5
to build the compiler on Windows.

diff --git a/gcc/ginclude/float.h b/gcc/ginclude/float.h
index 2954cc4..d18c390 100644
--- a/gcc/ginclude/float.h
+++ b/gcc/ginclude/float.h
@@ -276,3 +276,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. 
If
 #endif /* __STDC_WANT_DEC_FP__ */

 #endif /* _FLOAT_H___ */
+
+#ifdef __MINGW32__
+#include_next <float.h>
+#endif

Would it be possible to apply this patch? Or is there still something
missing/wrong for this to happen?

Pascal.



More information about the Gcc-bugs mailing list