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] fix rounding between real and integer


Tested on i686-linux, committed on trunk.

The result of a conversion of a real value to an integer type performs
rounding (ARM 4.6 (33)). This rounding was not being performed when the
operand in the conversion was a multiplication or division of two fixed-
point values represented as 64-bit quantities.
gnat.dg/conv_real.adb must compile and execute quietly.

2006-10-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_fixd.adb (Rounded_Result_Set): For multiplication and division of
	fixed-point operations in an integer context, i.e. as operands of a
	conversion to an integer type, indicate that result must be rounded.

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]