From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8333 invoked by alias); 23 Apr 2003 23:32:20 -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 8326 invoked from network); 23 Apr 2003 23:32:19 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 23 Apr 2003 23:32:19 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id h3NNWI807089; Wed, 23 Apr 2003 16:32:18 -0700 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: Daniel Berlin Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [RFA] handling of 'operator' in cp_find_first_component References: <5431A3D8-74CF-11D7-A78B-000A95A34564@dberlin.org> From: David Carlton Date: Wed, 23 Apr 2003 23:49:00 -0000 In-Reply-To: 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-04/txt/msg00456.txt.bz2 On 23 Apr 2003 16:27:03 -0700, David Carlton said: > Hmm. I'm confused. When I play around with this further, life is > getting more bizarre: GCC happily compiles the following: > class C {}; > template int foo(int a) > { > return C(); > } > template T foo (T a) > { > return 10; > } > even though the first function is returning an object of the wrong > type! Am I going crazy, or is that just a bug? No, it's not a bug: it's just that the error isn't signalled until the template is instantiated, which I wasn't doing. Silly me. David Carlton carlton@math.stanford.edu