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] Exception messages for bad value in 'Value attribute


This patch adds exception messages for some exceptions raised in
System.Value_Real instead of giving line numbers in s-valrea.adb

The following program:

procedure Test_ValRea is
begin
  if Float'Value("boom") > 0.0 then
    null;
  end if;
end;

gives when executed:

raised CONSTRAINT_ERROR : invalid character in 'Value string

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

2009-06-22  Robert Dewar  <dewar@adacore.com>

	* s-valrea.adb (Bad_Based_Value): New procedure
	(Scan_Real): Raise exceptions with messages

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]