From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25726 invoked by alias); 3 Mar 2009 18:10:42 -0000 Received: (qmail 25707 invoked by uid 22791); 3 Mar 2009 18:10:42 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Mar 2009 18:10:35 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n23IATmk025746; Tue, 3 Mar 2009 13:10:29 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n23IANmP022164; Tue, 3 Mar 2009 13:10:24 -0500 Received: from opsy.redhat.com (vpn-13-15.rdu.redhat.com [10.11.13.15]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n23IAMmI027758; Tue, 3 Mar 2009 13:10:22 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id A1BF23780FB; Tue, 3 Mar 2009 11:10:20 -0700 (MST) To: Jan Kratochvil Cc: Mark Kettenis , drow@false.org, gdb-patches@sourceware.org Subject: Re: [patch] Fix `return' of long/long-long results with no debuginfo References: <20090211194511.GA9324@host0.dyn.jankratochvil.net> <200902112040.n1BKdxb3028188@brahms.sibelius.xs4all.nl> <20090211205045.GB9762@caradoc.them.org> <200902112122.n1BLMf8q000100@brahms.sibelius.xs4all.nl> <20090211214646.GA22247@host0.dyn.jankratochvil.net> <200902112157.n1BLvplk011339@brahms.sibelius.xs4all.nl> <20090211220824.GA26040@host0.dyn.jankratochvil.net> <200902112237.n1BMbbOb006035@brahms.sibelius.xs4all.nl> <20090211225012.GA28683@host0.dyn.jankratochvil.net> From: Tom Tromey Reply-To: tromey@redhat.com Date: Tue, 03 Mar 2009 18:10:00 -0000 In-Reply-To: <20090211225012.GA28683@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Wed\, 11 Feb 2009 23\:50\:12 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00033.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Weighing in on an old-ish thread. AFAIK this has never reached any sort of resolution. Jan> Your suggestion ("type of the return value expression given by the user"): Jan> + improvement over the current state (one _can_ return long or long long) Jan> - may be more tricky to the user (requirement to cast to long or long long if Jan> the inferior function returns such type) How about, in the specific case of "return" from a function without debug info, we simply require the user to supply a cast to the desired type. This avoids any problems in choosing a default and it helps avoid errors introduced by using the type implicit in the expression. Tom