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] fixed_io fix


Tested on i686-linux, committed on trunk

There were cases when exception Layout_Error was not raised for negative
numbers when Exp /= 0 and there was not room in the string for the minus
sign. This patch ensures that Layout_Error is raised in these cases.

gnat.dg/test_fixed_io.adb should execute silently.

There were also cases when characters were put outside of the range of string
out parameter To. This patch ensure that this will never be the case.

2007-06-06  Vincent Celier  <celier@adacore.com>

	* a-tifiio.adb (Put, internal): For negative numbers, check that there
	is room for at least one digit and the minus sign.
	(Put.Put_Character): Never put a character outside of the range of
	string To.

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]