[Bug c++/99160] A wrong accessible check when using a using-declaration that introduces the names of type and function

2021-08-17 Thread xmh970252187 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160 --- Comment #6 from jim x --- struct A{ struct Name{}; void Name(){} }; struct B:A{ using A::Name; //#1 }; int main() { struct B::Name d; } According to [basic.lookup#general-4], the lookup set occurs at `#1` would discard the

[Bug c++/99160] A wrong accessible check when using a using-declaration that introduces the names of type and function

2021-08-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160 --- Comment #5 from Jonathan Wakely --- If that's what "ignored" means here then I think a note would be helpful.

[Bug c++/99160] A wrong accessible check when using a using-declaration that introduces the names of type and function

2021-08-16 Thread xmh970252187 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160 --- Comment #4 from jim x --- [namespace.udecl#1] says > Each using-declarator in a using-declaration names the set of declarations > found by lookup ([basic.lookup.qual]) for the using-declarator, except that > class and enumeration

[Bug c++/99160] A wrong accessible check when using a using-declaration that introduces the names of type and function

2021-08-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160 --- Comment #3 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > he using-declaration finds a class and a function, and ignores the class, See [namepace.udecl] p1 and [basic.lookup.general] p4.

[Bug c++/99160] A wrong accessible check when using a using-declaration that introduces the names of type and function

2021-08-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160 --- Comment #2 from Jonathan Wakely --- I think GCC is correct here. The using-declaration finds a class and a function, and ignores the class, which means it only redeclares the function as public. That means B::C is indeed referring to a

[Bug c++/99160] A wrong accessible check when using a using-declaration that introduces the names of type and function

2021-08-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|