[rfc][16/37] Eliminate builtin_type_ macros: Ada fixed/double conversions

Joel Brobecker brobecker@adacore.com
Fri Sep 5 23:13:00 GMT 2008


> 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



More information about the Gdb-patches mailing list