From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95131 invoked by alias); 3 Mar 2015 14:26:13 -0000 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 Received: (qmail 95082 invoked by uid 48); 3 Mar 2015 14:26:09 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65291] mention that default arguments of constructors are not inherited Date: Tue, 03 Mar 2015 14:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00307.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65291 --- Comment #4 from Jonathan Wakely --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #3) > BTW, clang rejects the 'using': >=20 > 10 : error: using declaration cannot refer to a constructor You need to compile as C++11. >>From gcc-bugs-return-479164-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 03 14:32:12 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 114251 invoked by alias); 3 Mar 2015 14:32:11 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 114186 invoked by uid 48); 3 Mar 2015 14:32:08 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65291] mention that default arguments of constructors are not inherited Date: Tue, 03 Mar 2015 14:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00308.txt.bz2 Content-length: 878 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65291 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic --- Comment #5 from Jonathan Wakely --- Reduced: struct A { A(int a = 0) { } }; struct B : A { using A::A; B(int, int); }; B b; FWIW the relevant output from Clang trunk is: c.cc:10:3: error: no matching constructor for initialization of 'B' B b; ^ c.cc:6:12: note: candidate constructor (inherited) not viable: requires 1 argument, but 0 were provided using A::A; ^ c.cc:2:3: note: inherited from here A(int a = 0) { } ^ EDG says simply: "c.cc", line 10: error: no default constructor exists for class "B" B b; ^