From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA95B385828B; Tue, 9 Apr 2024 06:56:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA95B385828B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712645763; bh=siOlU1k5iH/RsB5ijE2WwACdlKDpCsUNC6R1IX2XPg8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cCl/1Fpa5IuCmiY15paElBtDAsdk8s4bNf+NdanYdXfSYe4rT3RXA5oCVHrQt44Of OhvXKI/yljchvh3ORnY16nvQytNw5euKJdipagu6iYOIim14F5aMLQd64n0xquhUeB uOC2dpeNQI3OnFH72U0v0I0V9xhDhioo6dZkACA4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/101545] copy attribute is not copying the C++11/C23 attributes correctly. Date: Tue, 09 Apr 2024 06:56:03 +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: 11.1.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_reconfirmed_on everconfirmed short_desc cc bug_status 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101545 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-04-09 Ever confirmed|0 |1 Summary|[[nodiscard]]: Incorrect |copy attribute is not |warning when creating a |copying the C++11/C23 |function alias |attributes correctly. CC| |pinskia at gcc dot gnu.org Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski --- Confirmed. It has nothing to do with aliases at all. All has to do with the copy attri= bute not copying the C++11/C23 attributes correctly. Even the following C++ code incorrectly warns. Like: ``` [[maybe_unused]] int foo(void); [[gnu::copy(foo)]] extern __typeof__(foo) bar; ```=