From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21170 invoked by alias); 22 Feb 2013 21:51:00 -0000 Received: (qmail 21116 invoked by uid 48); 22 Feb 2013 21:50:38 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56429] New: [C++11] Explicitly defaulted private constructor is not private Date: Fri, 22 Feb 2013 21:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg02265.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56429 Bug #: 56429 Summary: [C++11] Explicitly defaulted private constructor is not private Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: redi@gcc.gnu.org class A { A() = default; }; struct B : A { }; B b; This should be rejected, but 4.6, 4.7 and 4.8 accept it. (4.4 also accepts it, while 4.5 rejects it for a different reason.)