From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1093 invoked by alias); 20 Apr 2003 13:39:39 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 1073 invoked by uid 48); 20 Apr 2003 13:39:39 -0000 Date: Sun, 20 Apr 2003 13:39:00 -0000 Message-ID: <20030420133939.1072.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, lehn@mathematik.uni-ulm.de, nobody@gcc.gnu.org, stip@mathematik.uni-ulm.de From: nathan@gcc.gnu.org Reply-To: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, lehn@mathematik.uni-ulm.de, nobody@gcc.gnu.org, stip@mathematik.uni-ulm.de, gcc-gnats@gcc.gnu.org Subject: Re: c++/10380: warning about "choosing ... over ..." when there is no choice X-SW-Source: 2003-04/txt/msg00876.txt.bz2 List-Id: Synopsis: warning about "choosing ... over ..." when there is no choice State-Changed-From-To: analyzed->closed State-Changed-By: nathan State-Changed-When: Sun Apr 20 13:39:39 2003 State-Changed-Why: not a bug. a = c, is equivalent to a.operator= (c) The candidate function is A::operator=(A const &) There are two user-defined conversion sequences to convert 'c' to 'A const &', these are 1) const qualify C, apply C::operator A () const 2) apply C::operator B (), convert to A const & these are indistinguishable conversion sequences, and therefore the call is ill-formed. G++ is not so picky about things, and finds a conversion that works, but might not be the one you expected. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10380