OSDN Git Service

Update handling of <process.h> test-suite limitation.
authorKeith Marshall <keith@users.osdn.me>
Fri, 17 Jan 2020 16:58:38 +0000 (16:58 +0000)
committerKeith Marshall <keith@users.osdn.me>
Fri, 17 Jan 2020 16:58:38 +0000 (16:58 +0000)
mingwrt/ChangeLog
mingwrt/include/process.h

index 6e260e5..97c7d4e 100644 (file)
@@ -1,5 +1,16 @@
 2020-01-17  Keith Marshall  <keith@users.osdn.me>
 
+       Update handling of <process.h> test-suite limitation.
+
+       * include/process.h (-Wbuiltin-declaration-mismatch)
+       [__IN_MINGWRT_TESTSUITE__ && __GNUC__ >= 7 && __cplusplus]: Drop...
+       [__cplusplus]: ...this diagnostic constraint, in test case when...
+       [__GNUC__ >= 9]: ...this applies; this diagnostic now affects both
+       C and C++ compilers, with respect to each of...
+       (execv, execve, execvp): ...these functions.
+
+2020-01-17  Keith Marshall  <keith@users.osdn.me>
+
        Support GCC-9.x gratuitous use of non-standard errno accessor API.
 
        * include/stdlib.h (_get_errno, _set_errno): Declare prototypes;
index ec37ae0..a5fa62f 100644 (file)
@@ -189,13 +189,18 @@ intptr_t execlp (const char *, const char *, ...);
 _CRTIMP __cdecl __MINGW_NOTHROW
 intptr_t execlpe (const char *, const char *,...);
 
-#if defined __cplusplus && __IN_MINGWRT_TESTSUITE__ && __GNUC__ >= 7
-/* From GCC-7 onwards, with "-Wsystem-headers" enabled, the C++ compiler
- * may emit unwanted "-Wbuiltin-declaration-mismatch" diagnostics related
- * to the following "execv" function declarations; these will precipitate
+#if __IN_MINGWRT_TESTSUITE__ && __GNUC__ >= 7
+/* From GCC-7 onwards, with "-Wsystem-headers" enabled, the compiler may
+ * emit unwanted "-Wbuiltin-declaration-mismatch" diagnostics related to
+ * the following "execv" function declarations; these will precipitate
  * testsuite failures, so suppress them.
  */
-# pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
+# if __GNUC__ >= 9 || defined __cplusplus
+  /* Prior to GCC-9, this limitation was apparent in the C++ compiler
+   * only; it became apparent in the C compiler, from GCC-9.
+   */
+#  pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
+# endif
 #endif
 
 _CRTIMP __cdecl __MINGW_NOTHROW