public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/54750] New: conflicting float.h on windows using mingw
@ 2012-09-29 12:42 p.obry at wanadoo dot fr
  0 siblings, 0 replies; only message in thread
From: p.obry at wanadoo dot fr @ 2012-09-29 12:42 UTC (permalink / raw)
  To: gcc-bugs


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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-29 12:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-29 12:42 [Bug c/54750] New: conflicting float.h on windows using mingw p.obry at wanadoo dot fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).