This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Extend some arithmetic operations to range types.
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 <Hilfinger@gnat.com>
>
> * 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