From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7243 invoked by alias); 1 Feb 2008 14:16:16 -0000 Received: (qmail 7233 invoked by uid 22791); 1 Feb 2008 14:16:15 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Feb 2008 14:15:49 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 52A7098218; Fri, 1 Feb 2008 14:15:47 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3551D98217; Fri, 1 Feb 2008 14:15:47 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JKwgE-0007PQ-Cg; Fri, 01 Feb 2008 09:15:46 -0500 Date: Fri, 01 Feb 2008 14:16:00 -0000 From: 'Daniel Jacobowitz' To: Pierre Muller Cc: gdb-patches@sourceware.org Subject: Re: [Patch] p-exp.y: Typecast left operand of BINOP_DIV to long double Message-ID: <20080201141546.GA28371@caradoc.them.org> Mail-Followup-To: Pierre Muller , gdb-patches@sourceware.org References: <000c01c861c5$149352b0$3db9f810$@u-strasbg.fr> <20080131222641.GD6715@caradoc.them.org> <003801c864a4$1866bee0$49343ca0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003801c864a4$1866bee0$49343ca0$@u-strasbg.fr> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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: 2008-02/txt/msg00008.txt.bz2 On Fri, Feb 01, 2008 at 08:28:52AM +0100, Pierre Muller wrote: > > It looks OK to me. Does the type of the left operand completely > > determine the type of the operation, or do you need to worry about the > > type of the right-hand exp too before you cast? > > But how can I do this? > It is still not really clear to me how I can > insert a typecast to left operand, only after > right operand has been parsed. > It would indeed be better to only do the typecast if both are integral > types. You could cast the right operand instead; wouldn't that work? -- Daniel Jacobowitz CodeSourcery