From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 62CE33858D28; Wed, 30 Aug 2023 18:28:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62CE33858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693420102; bh=DWMtTR8l/djhQM2sj3Gv3Z7gQW/UQse7iY88xUxGLY8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PFkc+kATSveAQwinRIYLSk/U1sEMxs4q+yJdc1JcG8vfMSYseSSophI7DomoKm+GT e73ljlv6K79jURRwQzJojzNIJrT0XUhY/ISUc3TMC+TWArwFIpsZJGBjx3x8wTBV5L t29QX66Jnm72HxMoMx94SNRlt1o9R/K26pACIqXs= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52953] function parameter name redeclarations not detected Date: Wed, 30 Aug 2023 18:28:20 +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.7.0 X-Bugzilla-Keywords: accepts-invalid, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D52953 --- Comment #8 from Jakub Jelinek --- Created attachment 55820 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55820&action=3Dedit gcc14-pr52953-2.patch Untested incremental patch to diagnose even extern redeclarations in the https://eel.is/c++draft/basic.scope#block-2 case. I'm not convinced this second part is correct though and there seems to be high implementation variance (g++ vs. clang++ vs. ICC vs. MSVC). Because https://eel.is/c++draft/basic.scope#block-2 talks about declarations whose target scope is the block scope of S, while https://eel.is/c++draft/basic.scope#scope-2.10 says that extern block-scope declarations target larger scope but bind a name in the immediate scope.=