From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1298) id 3EF8A3857BA0; Sun, 2 Oct 2022 09:13:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3EF8A3857BA0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664702029; bh=/8WdkLLOMbMERTv940mQN53pm/3iiXU7kSoGGAvNoGI=; h=From:To:Subject:Date:From; b=cxFduzrZxuR4Uy26Z3EbKBQdnly0s8b9HtAB/WCsDfifGi+Y9+f4u3jbvxvJCGGXT 89DRuxmiBbKibDaCxESAx+gPX91oYTA9sY35jl5zh3VIRE19cZdMKQVO7Zk+vvD8jA MTTf2nnn1qAoO1/UHBZqjK4nFMXbxo3/X7s6B4lY= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Olivier Hainque To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3017] Prevent secondary warning from diagnostic tweak in gthr-vxworks.h X-Act-Checkin: gcc X-Git-Author: Olivier Hainque X-Git-Refname: refs/heads/master X-Git-Oldrev: 6ed7eee30f4c5e7a4ae0119bbc93a1487751cbc7 X-Git-Newrev: 372044a67ec8346f4f308c5fe79d9e1cb6e7e6c6 Message-Id: <20221002091349.3EF8A3857BA0@sourceware.org> Date: Sun, 2 Oct 2022 09:13:49 +0000 (GMT) List-Id: https://gcc.gnu.org/g:372044a67ec8346f4f308c5fe79d9e1cb6e7e6c6 commit r13-3017-g372044a67ec8346f4f308c5fe79d9e1cb6e7e6c6 Author: Olivier Hainque Date: Thu Feb 3 15:57:32 2022 +0000 Prevent secondary warning from diagnostic tweak in gthr-vxworks.h Within gthr-vxworks.h, we prevent C++ errors from missing declarations in some system headers by prepending their inclusion with a #pragma GCC diagnostic ignored "-Wstrict-prototypes" But Wstrict-prototypes is internally registered as valid for C/ObjC only, not C++, and this trick in turn triggers a Wpragma warning with -Wsystem-headers. This change just arranges to ignore the secondary warning locally. 2021-02-03 Olivier Hainque * config/gthr-vxworks.h: Prevent Wpragma warning for the pragma diagnostics on Wstrict-prototypes. Diff: --- libgcc/config/gthr-vxworks.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index 9861a11511a..31c4b9f2557 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -38,8 +38,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <_vxworks-versions.h> /* Some VxWorks headers profusely use typedefs of a pointer to a function with - undefined number of arguments. */ + undefined number of arguments. Arrange to ignore declaration errors in C++, + which is achievable by ignoring Wstrict-prototypes diagnostics even when the + option is registered as only valid for c/objc. */ #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wstrict-prototypes" #include #pragma GCC diagnostic pop