From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DF2A73857809; Mon, 25 Apr 2022 14:44:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF2A73857809 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105377] Likely a misleading clang warning -Wc++20-attribute-extensions Date: Mon, 25 Apr 2022 14:44:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2022 14:44:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105377 --- Comment #4 from Jonathan Wakely --- But we don['t want to use gnu++17 because we want the compiler to be built using portable ISO C++17. An unrecognized attribute is a portable ISO C++17 construct, it just doesn't do anything (except maybe give a warning). We could add: #ifdef __clang__ #pragma clang diagnostic ignored "-Wc++20-attribute-extensions" #endif To disable this warning, since we know we're already guarding the attribute with __has_cpp_attribute.=