[Bug c++/94553] New: Revisit [basic.scope.declarative]/4.2
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 10 18:11:41 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94553
Bug ID: 94553
Summary: Revisit [basic.scope.declarative]/4.2
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
<http://eel.is/c++draft/basic.scope#declarative-4.2> has a note:
A structured binding ([dcl.struct.bind]), namespace name ([basic.namespace]),
or class template name ([temp.pre]) must be unique in its declarative region.
but we don't fully implement that. Consequently, the following is
accepts-valid. (The structured binding part was added in CWG 2289.)
void
f ()
{
int arr[1] = { 1 };
struct A { };
auto [A] = arr; // error
auto [B] = arr;
struct B { }; // error
}
struct C { };
template<typename> int C; // error
template<typename> int D;
struct D { }; // error
More information about the Gcc-bugs
mailing list