[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2024-04-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 Andrew Pinski changed: What|Removed |Added CC||zhonghao at pku dot org.cn --- Comment

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2021-01-30 Thread anthonysharp15 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #12 from Anthony Sharp --- Okay, so it actually turns out public virtual bases CAN be derived from, since the C++ spec literally gives an example of just that (e.g. see

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2021-01-29 Thread richard-gccbugzilla at metafoo dot co.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #11 from Richard Smith --- (In reply to Jonathan Wakely from comment #10) > It looks like Clang has a bug with the inaccessible constructor too, and > strangely inconsistent handling of the inaccessible destructor. Access checks

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2021-01-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2021-01-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #9 from Jonathan Wakely --- (In reply to Nick Krempel from comment #0) > The following code should fail to compile but does not: > > struct V {}; > struct B : private virtual V {}; > struct D : B {}; > > int main() { > D d; >

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2021-01-29 Thread anthonysharp15 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 Anthony Sharp changed: What|Removed |Added CC||anthonysharp15 at gmail dot com ---

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2012-10-30 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #6 from Daniel Krügler daniel.kruegler at googlemail dot com 2012-10-30 07:28:47 UTC --- (In reply to comment #4) I think the standard is unclear on this. That defect report has been queried by experts. Let me clarify that I have

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2012-10-30 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #7 from Daniel Krügler daniel.kruegler at googlemail dot com 2012-10-30 19:48:21 UTC --- (In reply to comment #5) Curious that G++, Comeau and Clang all accept the example in CWG issue 7, despite the rationale (and Mike) indicating

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2012-10-29 Thread ndkrempel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #1 from Nick Krempel ndkrempel at gmail dot com 2012-10-29 16:08:49 UTC --- Not so clear this is a bug, as the default constructor for D could be generated in the following form: struct D : B { D() : B(), ::V() {} }

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added CC||jason at

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2012-10-29 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #3 from Daniel Krügler daniel.kruegler at googlemail dot com 2012-10-29 19:20:26 UTC --- (In reply to comment #2) This is http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#7 which was closed as NAD saying This is what

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2012-10-29 Thread ndkrempel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #4 from Nick Krempel ndkrempel at gmail dot com 2012-10-29 22:41:48 UTC --- I think the standard is unclear on this. That defect report has been queried by experts. It comes down to something subtle about how the generated

[Bug c++/55120] Inaccessible virtual base constructor does not prevent generation of default constructor

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120 --- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org 2012-10-29 23:12:12 UTC --- I think Johannes is right, the virtual base is default-initialized without needing to look up its name in the scope of D, and the implicitly-defined