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.

Reply via email to