From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 07E7E3858407; Wed, 7 Feb 2024 09:27:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07E7E3858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707298033; bh=nV435ZNhYhAr447ywSKfSpMPylck3Ra9+aNfZj6bIac=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DxQQJWnnwic0Ri/uMLJuA4UvkaqqvX2vu1W+8epnJD13Swpqa8EPYYDk33JIopS2o mVBFxbDHQqOyfNDr0tCjsw9aSimD/wtVyPeE48qNe93eWbqm2wK939BiRx+hE3o7k8 MwKOO3GgryUAlsNBqyGHQ4N9qBcvQQX/x8o4d4zA= From: "jlame646 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/21498] [c++0x] friend declaration can name non-class with class-key Date: Wed, 07 Feb 2024 09:27:11 +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: 4.0.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: jlame646 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D21498 Jason Liam changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jlame646 at gmail dot com --- Comment #16 from Jason Liam --- GCC still accepts the code when it is ill-formed as explained here:https://stackoverflow.com/questions/77932976/why-is-a-type-alias-not-a= llowed-to-be-a-friend-class-name-in-c/77932987#77932987 Here is a demo that shows that gcc accepts the invalid code: https://godbolt.org/z/sK8Trh5PG=