From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13372 invoked by alias); 4 Mar 2009 21:29:58 -0000 Received: (qmail 13364 invoked by uid 22791); 4 Mar 2009 21:29:58 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Mar 2009 21:29:51 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id n24LTVkl021241; Wed, 4 Mar 2009 22:29:31 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n24LTUKa000770; Wed, 4 Mar 2009 22:29:30 +0100 (CET) Date: Wed, 04 Mar 2009 21:29:00 -0000 Message-Id: <200903042129.n24LTUKa000770@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: jan.kratochvil@redhat.com, drow@false.org, gdb-patches@sourceware.org In-reply-to: (message from Tom Tromey on Tue, 03 Mar 2009 11:10:19 -0700) 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> 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/msg00056.txt.bz2 > From: Tom Tromey > Date: Tue, 03 Mar 2009 11:10:19 -0700 > > >>>>> "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. Do we have a way to figure out if such a cast is present in the expression passed as an argument to the return command?