public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55120] New: Inaccessible virtual base constructor does not prevent generation of default constructor
@ 2012-10-29 16:00 ndkrempel at gmail dot com
  2012-10-29 16:09 ` [Bug c++/55120] " ndkrempel at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: ndkrempel at gmail dot com @ 2012-10-29 16:00 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55120

             Bug #: 55120
           Summary: Inaccessible virtual base constructor does not prevent
                    generation of default constructor
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ndkrempel@gmail.com


The following code should fail to compile but does not:

struct V {};
struct B : private virtual V {};
struct D : B {};

int main() {
    D d;
}

According to N3376 section 12.1 paragraph 5, the defaulted default constructor
for D should be defined as deleted, as the default constructor for the virtual
base V is inaccessible from D.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-04-04 23:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29 16:00 [Bug c++/55120] New: Inaccessible virtual base constructor does not prevent generation of default constructor ndkrempel at gmail dot com
2012-10-29 16:09 ` [Bug c++/55120] " ndkrempel at gmail dot com
2012-10-29 17:42 ` redi at gcc dot gnu.org
2012-10-29 19:20 ` daniel.kruegler at googlemail dot com
2012-10-29 22:42 ` ndkrempel at gmail dot com
2012-10-29 23:12 ` redi at gcc dot gnu.org
2012-10-30  7:29 ` daniel.kruegler at googlemail dot com
2012-10-30 19:48 ` daniel.kruegler at googlemail dot com
2021-01-29 12:47 ` anthonysharp15 at gmail dot com
2021-01-29 12:59 ` redi at gcc dot gnu.org
2021-01-29 13:01 ` redi at gcc dot gnu.org
2021-01-29 22:55 ` richard-gccbugzilla at metafoo dot co.uk
2021-01-30 12:46 ` anthonysharp15 at gmail dot com
2024-04-04 23:19 ` pinskia at gcc dot gnu.org

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).