From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18445 invoked by alias); 31 Mar 2004 19:05:18 -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 18419 invoked from network); 31 Mar 2004 19:05:15 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 31 Mar 2004 19:05:15 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B8l1Z-0001Kq-MX; Wed, 31 Mar 2004 14:05:17 -0500 Date: Wed, 31 Mar 2004 19:05:00 -0000 From: Daniel Jacobowitz To: Paul Hilfinger Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: Extend some arithmetic operations to range types. Message-ID: <20040331190517.GA5010@nevyn.them.org> Mail-Followup-To: Paul Hilfinger , gdb-patches@sources.redhat.com References: <20040326105916.3FAA5F2DA7@nile.gnat.com> <20040326180659.GA21603@nevyn.them.org> <20040329112951.08FBEF2F03@nile.gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040329112951.08FBEF2F03@nile.gnat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00767.txt.bz2 On Mon, Mar 29, 2004 at 06:29:51AM -0500, Paul Hilfinger wrote: > > Here is a second draft of the patch I submitted on 26 March. I > believe I have addressed Daniel's comments. Rather than using a > 'base_type' function to strip off range-type wrappers, I use the > existing is_integral_type. This has the side-effect of extending some > of the operations to work on BOOL or CHAR, which I am assuming is > harmless. By using is_integral_type, we also can eliminate some calls > to COERCE_ENUM. For consistency and to tidy things up a bit, I have > taken the liberty of changing value_binop to also use is_integral_type. > > Comments? > > Paul Hilfinger > ACT, Inc. > > 2004-03-26 Paul N. Hilfinger > > * valarith.c: Update copyright notice. > (value_add): Handle range types. > (value_sub): Ditto. > (value_equal): Ditto. > (value_less): Ditto. > (value_neg): Ditto. > (value_complement): Ditto. > (value_binop): Simplify slightly by using is_integral_type and > eliminiating unnecessary COERCE_ENUMs. This patch looks good to me. Assuming that you've run the testsuite with no regressions, it is OK. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer