This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc][16/37] Eliminate builtin_type_ macros: Ada fixed/double conversions
- From: Joel Brobecker <brobecker at adacore dot com>
- To: uweigand at de dot ibm dot com
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 5 Sep 2008 16:12:41 -0700
- Subject: Re: [rfc][16/37] Eliminate builtin_type_ macros: Ada fixed/double conversions
- References: <20080831175045.128504000@de.ibm.com> <20080831175126.988947000@de.ibm.com>
> ada-lang.c uses builtin_type_double as intermediate type in some
> type conversions. This doesn't seem to be necessary, as the
> value_as_double and value_from_double routines should be able
> to handle the same types directly ...
This looks like a nice cleanup :), and we can always fix any ommission/bug
that we might find in value_as/from_double routines later. If we find any.
Thanks!
> ChangeLog:
>
> * ada-lang.c (cast_to_fixed): Do not cast to builtin_type_double.
> (cast_from_fixed_to_double): Rename to ...
> (cast_from_fixed): ... this. Add TYPE parameter. Use it instead
> of builtin_type_double.
> (ada_value_cast): Use cast_from_fixed instead of casting result
> of cast_from_fixed_to_double.
> (ada_evaluate_subexp): Update calls to cast_from_fixed_to_double.
--
Joel