From 0709a645730efd874aa6d72e4673ddd01f33f00a Mon Sep 17 00:00:00 2001 From: Keith Marshall Date: Sun, 26 Aug 2018 20:40:38 +0100 Subject: [PATCH] Circumvent testsuite failure with GCC-7+. --- mingwrt/ChangeLog | 8 ++++++++ mingwrt/include/process.h | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index fe327f1..9edae87 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,11 @@ +2018-08-26 Keith Marshall + + Circumvent testsuite failure with GCC-7+. + + * include/process.h (execv, execve, execvp): Subject declarations to + #pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch", if... + [__cplusplus && __IN_MINGWRT_TESTSUITE__ && __GNUC__ >= 7]: ...this. + 2018-04-16 Keith Marshall Suppress glob-brace expansion within quoted arguments. diff --git a/mingwrt/include/process.h b/mingwrt/include/process.h index aadbc89..ec37ae0 100644 --- a/mingwrt/include/process.h +++ b/mingwrt/include/process.h @@ -189,6 +189,15 @@ 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 + * testsuite failures, so suppress them. + */ +# pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch" +#endif + _CRTIMP __cdecl __MINGW_NOTHROW intptr_t execv (const char *, const char * const *); @@ -198,6 +207,12 @@ intptr_t execve (const char *, const char * const *, const char * const *); _CRTIMP __cdecl __MINGW_NOTHROW intptr_t execvp (const char *, const char * const *); +#if defined __cplusplus && __IN_MINGWRT_TESTSUITE__ && __GNUC__ >= 7 +/* Re-enable previously suppressed "-Wbuiltin-declaration-mismatch" warnings. + */ +# pragma GCC diagnostic warning "-Wbuiltin-declaration-mismatch" +#endif + _CRTIMP __cdecl __MINGW_NOTHROW intptr_t execvpe (const char *, const char * const *, const char * const *); -- 2.11.0