From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 684843858D20; Fri, 4 Feb 2022 13:29:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 684843858D20 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104379] [9/10/11/12 Regression] -Wshadow warning given three times Date: Fri, 04 Feb 2022 13:29:52 +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.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de 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: 9.5 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: Fri, 04 Feb 2022 13:29:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104379 --- Comment #5 from rguenther at suse dot de --- On Fri, 4 Feb 2022, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104379 >=20 > --- Comment #4 from Jonathan Wakely --- > So you can imagine what happens if you combine constructor clones with > templates! :-D >=20 > template > struct S > { > int i; > S(int i) { (void) i; } > }; >=20 > S i(1); > S j(1); >=20 > wheeeeeeeee! It's just really insisting on you to fix it! ;) Somehow it feels the shadow stuff runs at the wrong place - it should run at _parsing_, not at instantiation [of ctor/dtor clones].=