OSDN Git Service

Work around GCC bug; force C++11 to support std::wcstof().
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Thu, 16 Feb 2017 22:07:56 +0000 (22:07 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Thu, 16 Feb 2017 22:07:56 +0000 (22:07 +0000)
mingwrt/ChangeLog
mingwrt/include/_mingw.h.in

index e3ffe46..03e10a5 100644 (file)
@@ -1,3 +1,12 @@
+2017-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Work around GCC bug; force C++11 to support std::wcstof().
+
+       * include/_mingw.h [_ISOC99_SOURCE && __cplusplus >= 201103L]
+       [__GNUC__ < 6] (_GLIBCXX_HAVE_WCSTOF): Define it to 1; it is required
+       because, prior to GCC-6, GCC's configuration process fails to specify
+       it correctly, and so invalidates its own <string> header file.
+
 2017-02-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Support brace expansion in globbing patterns.
index da4ea87..5e54a22 100644 (file)
@@ -504,9 +504,10 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case.  */
  /* Due to a configuration defect in GCC versions prior to GCC-6, when
   * compiling C++11 code, the ISO-C99 functions may not be incorporated
   * into the appropriate namespace(s); we may be able to mitigate this,
-  * by ensuring that this GCC configuration macro is defined.
+  * by ensuring that these GCC configuration macros are defined.
   */
-# define _GLIBCXX_USE_C99  1
+# define _GLIBCXX_USE_C99      1
+# define _GLIBCXX_HAVE_WCSTOF  1
 #endif
 
 #if ! defined _MINGW32_SOURCE_EXTENDED && ! defined __STRICT_ANSI__