OSDN Git Service

Let _ISOC11_SOURCE imply _ISOC99_SOURCE.
authorKeith Marshall <keith@users.osdn.me>
Thu, 5 Mar 2020 13:49:29 +0000 (13:49 +0000)
committerKeith Marshall <keith@users.osdn.me>
Thu, 5 Mar 2020 13:49:29 +0000 (13:49 +0000)
mingwrt/ChangeLog
mingwrt/include/_mingw.h.in

index 204484e..ded8a12 100644 (file)
@@ -1,5 +1,12 @@
 2020-03-05  Keith Marshall  <keith@users.osdn.me>
 
+       Let _ISOC11_SOURCE imply _ISOC99_SOURCE.
+
+       * include/_mingw.h.in [! defined _ISOC99_SOURCE]
+       [defined _ISOC11_SOURCE] (_ISOC99_SOURCE): Define as 0x0F.
+
+2020-03-05  Keith Marshall  <keith@users.osdn.me>
+
        Avoid deprecated specification of esp in asm clobber list.
 
        * crt1.c (__mingw_CRTStartup): In inline assembly, forced modulo-16
index b72b853..a8a972d 100644 (file)
@@ -7,7 +7,7 @@
  * $Id$
  *
  * Written by Mumit Khan  <khan@xraylith.wisc.edu>
- * Copyright (C) 1999, 2001-2011, 2014-2019, MinGW.org Project
+ * Copyright (C) 1999, 2001-2011, 2014-2020, MinGW.org Project
  *
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -569,7 +569,14 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case.  */
   * to ensure that we can identify the reason for implicit declaration,
   * (in the event that we may need to discriminate).
   */
-# if __STDC_VERSION__ >= 199901L
+# ifdef _ISOC11_SOURCE
+  /* The user has explicitly selected ISO-C11 compliance; regardless of
+   * requested C11 compliance level, implicitly enable C99 compliance to
+   * the maximum level supported.
+   */
+#  define _ISOC99_SOURCE  0x0F
+
+# elif __STDC_VERSION__ >= 199901L
   /* This represents a compiler supporting ISO-C99; enable all potential
    * use of ISO-C99 features, (to the maximum extent supportable), which
    * presumably also covers all C++11 and POSIX.1 usage.