From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AE0A138B6887; Tue, 4 Jun 2024 18:27:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE0A138B6887 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717525646; bh=7GKxRu4fkBWcXbH7BrKyJYZcoop4geP/Rip0AEHPans=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ag6fyt4Y/xH1uLVsDd3PXsrtxaUFOGuYXGuiBoljhqsIJZllteafXhwFJKrBrtsxA ztJwawYlIzwwzD8rqtxNgI51eixN09bRO8daNzKVNZQD24xqhny+921ny3PV4bUhUV oOrZ23BBGOfnPP9AD37VHxzldsw6OIq7+klfrvGo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115343] Member name lookup does not consider equivalent type aliases from different base classes to be equivalent. Date: Tue, 04 Jun 2024 18:27:26 +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: 15.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115343 --- Comment #1 from Andrew Pinski --- Note the original example is invalid code to begin. ``` :5:11: warning: declaration of 'using foo::tag =3D struct tag' chan= ges meaning of 'tag' [-Wchanges-meaning] 5 | using tag =3D tag; | ^~~ :5:17: note: used here to mean 'struct tag' 5 | using tag =3D tag; | ^~~ :2:8: note: declared here 2 | struct tag { }; | ^~~ ``` But a simple change to the source: ``` struct tag { }; struct foo { using tag1 =3D tag; }; struct bar {=20 using tag1 =3D tag; }; struct foobar : foo, bar { }; int main() { foobar::tag1 _; } ``` Gets the questionable ambiguous error message without a warning.=