From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27828 invoked by alias); 20 Jul 2013 22:14:07 -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 25595 invoked by uid 48); 20 Jul 2013 22:12:05 -0000 From: "richard-gccbugzilla at metafoo dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57942] g++-4.8.1 tries to instantiate wrong constructor (C++11) Date: Sat, 20 Jul 2013 22:14: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: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: richard-gccbugzilla at metafoo dot co.uk X-Bugzilla-Status: UNCONFIRMED 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: cc 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: 2013-07/txt/msg00925.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57942 Richard Smith changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |richard-gccbugzilla@metafoo | |.co.uk --- Comment #1 from Richard Smith --- Reduced to: template struct S { typename T::error type; }; struct X {}; void f(S *); void f(...); void g() { f((X*)0); } It looks like, when considering a conversion from A* to B*, where A is a class type, gcc attempts to complete B. There seems to be no obvious justification for this (it doesn't help in determining whether B is a base class of A, which seems like the most likely explanation for this behavior).