From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19541 invoked by alias); 23 Jan 2008 18:25:38 -0000 Received: (qmail 19512 invoked by uid 22791); 23 Jan 2008 18:25:37 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 Jan 2008 18:25:19 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C02532A9656; Wed, 23 Jan 2008 13:25:17 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9NUVuteWCJwe; Wed, 23 Jan 2008 13:25:17 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 80BE12A9658; Wed, 23 Jan 2008 13:25:17 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id DFB86E7ACB; Wed, 23 Jan 2008 10:25:14 -0800 (PST) Date: Wed, 23 Jan 2008 18:25:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: 'Eli Zaretskii' , gdb-patches@sourceware.org Subject: Re: [RFA] Handle BINOP_INTDIV in valarith.c Message-ID: <20080123182514.GB3979@adacore.com> References: <002d01c85849$ef420f80$cdc62e80$@u-strasbg.fr> <002401c85c1a$b1997b30$14cc7190$@u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002401c85c1a$b1997b30$14cc7190$@u-strasbg.fr> User-Agent: Mutt/1.4.2.2i 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-01/txt/msg00558.txt.bz2 > I will send a separate patch for > a new binop called BINOP_FLOATDIV > that will force the result of 'a / b' to be a > float in all cases. That seems unnecessary to me unless BINOP_DIV and your BINOP_FLOATDIV have different meanings in Pascal? Otherwise, I think the problem is that the pascal language needs its own expression evaluator so that it can handle the '/' operator specifically. The rest can be delegated to the standard expression evaluator. > This is the right thing to do for pascal, but I don't know about the > other languages: do fortran, Ada, Modula-2 or java allow 'a / b' for > a or b of integer types? Ada does, but it's an overloaded operator, so the type of the result depends on the type of the arguments. Don't know about the other languages. -- Joel