From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA4A23858D1E; Tue, 25 Apr 2023 10:05:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA4A23858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682417129; bh=GwmGUvnlCiInF6WPM8LoAvUCJTwJhZrFA8S+0aE10oU=; h=From:To:Subject:Date:From; b=ZNEDFx7ccrH+ru6y01XG2nLJHWZTDrYdV2qfzhxL9DvLK1T/VDfYElSfJMqXRAE4w B1wFYHxjipgYKVpn+mGEIWrqc/tLWYb7+Hf1i6BTDN94+mQXyiJiqsAQdCYcpBMDhN FyvjBYAV5QbLt8D38/t/4BfS53hwDhQxyoN/XS38= From: "jlame646 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109621] New: GCC accepts invalid program with multiple using declarations Date: Tue, 25 Apr 2023 10:05:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jlame646 at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 109621 Summary: GCC accepts invalid program with multiple using declarations Product: gcc Version: 13.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jlame646 at gmail dot com Target Milestone: --- The following invalid program(afaik) is accepted by gcc and msvc. https://godbolt.org/z/1Tsx54ro5 ``` namespace X=20 {=20 struct type {};=20 } namespace Y=20 {=20 using type =3D int;=20 } using X::type; using Y::type; int main() { auto i =3D sizeof(type); //gcc and msvc accepts this but clang rejects = this } ```=