From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6576E3858D1E; Tue, 25 Apr 2023 15:29:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6576E3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682436553; bh=+jqMTlkgns1j+5jHoqcPcm3+oQTrgggkuNllPVP7UJ4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ATJuyV+6f7075Uvk1NXvwGu3l9QjBKOJsc6qNj1TiRTHD5P5KQJa0PnlO4+bsmL4d ckCOQYbzKKCedrwXPoCtIqmy+BJ/hrpToC75fL7gjfhrdxSo7gGVPKwV18SAZtw8u3 fOvN0MbFTOxi+MGlWB5IKFvBv78YKxzv8wwiio5s= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109621] [10/11/12/13/14 Regression] GCC accepts invalid program with multiple using declarations Date: Tue, 25 Apr 2023 15:29:13 +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: 13.1.1 X-Bugzilla-Keywords: accepts-invalid 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: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc cf_known_to_fail target_milestone everconfirmed bug_status cf_known_to_work cf_reconfirmed_on 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=3D109621 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|GCC accepts invalid program |[10/11/12/13/14 Regression] |with multiple using |GCC accepts invalid program |declarations |with multiple using | |declarations Known to fail| |4.4.7 Target Milestone|--- |10.5 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Known to work| |4.1.2 Last reconfirmed| |2023-04-25 --- Comment #1 from Andrew Pinski --- C++98 version which shows it is a regression and it started to fail between= GCC 4.1.2 and 4.4.7: ``` namespace X=20 {=20 struct type {};=20 } namespace Y=20 {=20 typedef int type; } using Y::type; using X::type; int i =3D sizeof(type); //gcc and msvc accepts this but clang rejects this ```=