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] Change Raise_Exception for AI-446 (Ada 2005 compatibility)


Tested on i686-linux, committed on trunk

This patch changes Raise_Exception so that the behavior is the same in
Ada 95 and Ada 2005 mode when passed Null_Id (Constraint_Error is raised).
This change in Ada 95 mode is authorized (actually required) by AI-446.
The code is simplified, because now the necessary test goes in the
run-time, and we can remove the special casing in Expand_Call to deal
with the difference in Ada 95 and Ada 2005 semantics.

The following program generates a line raised Constraint_Error in
both -gnat05 and -gnat95 modes.

with Ada.Exceptions; use Ada.Exceptions;
procedure testnullid is
begin
   Raise_Exception (Null_Id);
end;

2008-04-08  Robert Dewar  <dewar@adacore.com>

	* a-except-2005.ads, a-except-2005.adb, a-except.ads, a-except.adb
	(Raise_Exception): In accordance with AI-446, raise CE for Null_Id
	(Raise_Exception_Always): Fix documentation accordingly

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]