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] Avoid generating too many decimal digits for certain fixed point types


This patch is a partial rewrite of Put_Scaled that allows for generation
or more digits than will be used for final output. This can happen for
smalls that are neither integer or the reciprocal of an integer.
The resulting scaled division result needs to rescaled and rounded
to avoid incorrectly rounded output and overflow of the output string.

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

2009-04-20  Geert Bosch  <bosch@adacore.com>

	* a-tifiio.adb (Put): Avoid generating too many digits for certain
	fixed types with smalls that are neither integer or the reciprocal
	of an integer.

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]