From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11501 invoked by alias); 5 Sep 2008 23:13:20 -0000 Received: (qmail 11492 invoked by uid 22791); 5 Sep 2008 23:13:19 -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; Fri, 05 Sep 2008 23:12:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 764CD2A971A; Fri, 5 Sep 2008 19:12:43 -0400 (EDT) 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 ErpBO1ZH5fHg; Fri, 5 Sep 2008 19:12:43 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 38B9C2A96BA; Fri, 5 Sep 2008 19:12:43 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2F147E7ACD; Sat, 6 Sep 2008 01:12:41 +0200 (CEST) Date: Fri, 05 Sep 2008 23:13:00 -0000 From: Joel Brobecker To: uweigand@de.ibm.com Cc: gdb-patches@sourceware.org Subject: Re: [rfc][16/37] Eliminate builtin_type_ macros: Ada fixed/double conversions Message-ID: <20080905231241.GI15267@adacore.com> References: <20080831175045.128504000@de.ibm.com> <20080831175126.988947000@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080831175126.988947000@de.ibm.com> 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-09/txt/msg00116.txt.bz2 > 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