public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-52953-4-AXgc1Dw620@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52953-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52953

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 55820
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55820&action=edit
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.

  parent reply	other threads:[~2023-08-30 18:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 21:36 [Bug c++/52953] New: g++-4.7.0 fails to detect function parameter name redeclarations meng at g dot clemson.edu
2012-04-12 21:53 ` [Bug c++/52953] " meng at g dot clemson.edu
2012-04-17 18:24 ` paolo.carlini at oracle dot com
2021-08-26 23:40 ` [Bug c++/52953] function parameter name redeclarations not detected pinskia at gcc dot gnu.org
2023-08-27 18:25 ` pinskia at gcc dot gnu.org
2023-08-30 18:22 ` jakub at gcc dot gnu.org
2023-08-30 18:28 ` jakub at gcc dot gnu.org [this message]
2023-09-05 15:30 ` cvs-commit at gcc dot gnu.org
2023-09-05 15:35 ` cvs-commit at gcc dot gnu.org
2023-09-05 15:42 ` jakub at gcc dot gnu.org
2023-09-06  6:18 ` gayathri.gottumukkala.27 at gmail dot com
2023-09-06 13:44 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52953-4-AXgc1Dw620@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).