This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Support target with both VAX and IEEE float


This patch allows the Ada front end to properly support static
evaluation of both VAX and IEEE floating point attributes on a single target.
Before we use a global setting from system.ads to determine wether a
floating point type supported denormals and signed zeros, but in order to
properly support static evaluation of VAX float literals, we need to
allow types-ecific values.

On VMS, the following should compile quietly:

package vms is
   type f is digits 6;
   pragma Float_Representation (Vax_Float, f);

   subtype Truth is Boolean range True .. True;

   T : Truth := not F'Signed_Zeros;
end;

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-11-06  Geert Bosch  <bosch@adacore.com>

	* eval_fat.adb (Machine, Succ): Fix front end to support static
	evaluation of attributes on targets with both VAX and IEEE float.
	* sem_util.ads, sem_util.adb (Has_Denormals, Has_Signed_Zeros):
	New type-specific functions. Previously we used Denorm_On_Target
	and Signed_Zeros_On_Target directly, but that doesn't work well
	for OpenVMS where a single target supports both floating point
	with and without signed zeros.
	* sem_attr.adb (Attribute_Denorm, Attribute_Signed_Zeros): Use
	new Has_Denormals and Has_Signed_Zeros functions to support both
	IEEE and VAX floating point on a single target.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]