From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6939 invoked by alias); 4 Aug 2009 22:42:47 -0000 Received: (qmail 6598 invoked by uid 48); 4 Aug 2009 22:42:24 -0000 Date: Tue, 04 Aug 2009 22:42:00 -0000 Message-ID: <20090804224224.6597.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/13979] Error message about no matching function for call with derived class arguments could be improved In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" 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: 2009-08/txt/msg00490.txt.bz2 ------- Comment #8 from manu at gcc dot gnu dot org 2009-08-04 22:42 ------- (In reply to comment #7) > > It might be an improvement if GCC gave different diagnostics for the case where > a suitable conversion sequence exists but cannot be used because it would > create an rvalue which cannot bind to a non-const reference, and the case where > there is no suitable conversion (i.e. the types are unrelated) I don't even know if we have different codepaths for those! > That seems to be what 2.95 attempted to do by saying "initializing 'blah' with > 'blah' will use a temporary" but I find that message confusing, as it *won't* > use a temporary because doing so is not valid. The message should really have > been something like "initializing 'blah' with 'blah' would use a temporary, but > that's not allowed" Agreed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13979