From: Keith Marshall Date: Mon, 26 Jun 2023 21:30:16 +0000 (+0100) Subject: Improve testsuite diagnostic message handling. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ee5365e968cab0cbd775fa1970c7b2d570d6472b;p=mingw%2Fmingw-org-wsl.git Improve testsuite diagnostic message handling. --- diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 737ab3b..e06e128 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,14 @@ +2023-06-26 Keith Marshall + + Improve testsuite diagnostic message handling. + + * include/process.h [__IN_MINGWRT_TESTSUITE__ && __GNUC__ >= 7]: Push + diagnostic state, to save the initial setting of, and then ignore... + (-Wbuiltin-declaration-mismatch): ...this, prior to declarations of... + (execv, execve, execvp): ...these functions; after these declarations, + pop the saved diagnostic state, to revert to the original condition, + rather than simply, and arbitrarily, enabling the warning. + 2022-08-26 Keith Marshall Do not expose private declarations in diff --git a/mingwrt/include/process.h b/mingwrt/include/process.h index ddca50a..6585d82 100644 --- a/mingwrt/include/process.h +++ b/mingwrt/include/process.h @@ -6,7 +6,7 @@ * $Id$ * * Written by Colin Peters - * Copyright (C) 1997-2001, 2003-2004, 2007-2008, 2016, 2022, + * Copyright (C) 1997-2001, 2003-2004, 2007-2008, 2016, 2022, 2023, * MinGW.OSDN Project * * @@ -196,6 +196,7 @@ intptr_t execlpe (const char *, const char *,...); * the following "execv" function declarations; these will precipitate * testsuite failures, so suppress them. */ +# pragma GCC diagnostic push # 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. @@ -213,10 +214,10 @@ 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 +#if __IN_MINGWRT_TESTSUITE__ && __GNUC__ >= 7 /* Re-enable previously suppressed "-Wbuiltin-declaration-mismatch" warnings. */ -# pragma GCC diagnostic warning "-Wbuiltin-declaration-mismatch" +# pragma GCC diagnostic pop #endif _CRTIMP __cdecl __MINGW_NOTHROW