lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 2c298709 2/3: Fix MinGW-gcc-12 breakage


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2c298709 2/3: Fix MinGW-gcc-12 breakage
Date: Fri, 13 Jan 2023 07:28:49 -0500 (EST)

branch: master
commit 2c298709ea3e64bb499cc0a8068f8cd04bec4358
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Fix MinGW-gcc-12 breakage
    
    MinGW-gcc-12 gave this warning:
      __STRICT_ANSI__ seems to have been undefined; this is not supported
    so that kludge can no longer be used.
---
 fenv_lmi_test.cpp | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/fenv_lmi_test.cpp b/fenv_lmi_test.cpp
index 0e189fea..1f15168b 100644
--- a/fenv_lmi_test.cpp
+++ b/fenv_lmi_test.cpp
@@ -21,17 +21,14 @@
 
 #include "pchfile.hpp"
 
-// Include this first, in order to get the prototype for nonstandard
-// _control87() before any other header can include <float.h>.
-// Historically, for cygwin with '-mno-cygwin', that didn't work quite
-// the same way as it does for MinGW:
-//   http://cygwin.com/ml/cygwin/2005-03/msg00752.html
-//   http://cygwin.com/ml/cygwin/2006-08/msg00521.html
-// but that deficiency is easily worked around below, and no lmi code
-// except this unit test uses that nonstandard function.
 #if defined __MINGW32__
-#   undef __STRICT_ANSI__
-#   include <float.h>
+// No lmi code except this unit test uses this nonstandard function.
+// MinGW declares it in <float.h> iff __STRICT_ANSI__ is not defined,
+// but in practice that macro is always defined, and #undef'ing it
+// is forbidden with gcc-12. The MinGW prototype is decorated with
+// various macros, but those are liable to change over time, and they
+// do not seem to be necessary.
+unsigned int _control87(unsigned int newcw, unsigned int mask);
 #endif // defined __MINGW32__
 
 #include "fenv_guard.hpp"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]