From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22821 invoked by alias); 4 Feb 2003 21:23:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22730 invoked from network); 4 Feb 2003 21:23:43 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by 172.16.49.205 with SMTP; 4 Feb 2003 21:23:43 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h14LNd223481; Tue, 4 Feb 2003 13:23:39 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa] handle integer downsizing correctly in C++ overloading References: <20030204183222.GB22089@nevyn.them.org> From: David Carlton Date: Tue, 04 Feb 2003 21:23:00 -0000 In-Reply-To: <20030204183222.GB22089@nevyn.them.org> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00140.txt.bz2 On Tue, 4 Feb 2003 13:32:22 -0500, Daniel Jacobowitz said: > I (still) don't have a copy of the standard; I think I'll see about > getting one this week. However, your explanation makes sense, and > matches my reading of the conversion code that GCC uses for overload > resolution (gcc/cp/call.c:build_conv and standard_conversion). This > patch is OK. Thanks, committed. To be honest, I would be shocked if we were getting conversion completely correct even after this patch (even setting aside scope issues arising from namespaces, subclasses, using declarations, and the like), but it's an improvement. I've read the relevant section of the standard only enough to know that: * Narrowing integer conversions are definitely acceptable, albeit not optimal. * Anybody who can figure out how overloading and namespaces should interact based on what the standard says is a _lot_ better at reading standards than I am. In cases like this, I've started adding code to the .cc files in the testsuite to verify that the compiler and I agree with what the standard says, because I don't always trust my understanding of these issues. David Carlton carlton@math.stanford.edu