-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
else
if Present (Renamed_Entity (Entity (Id))) then
- if Entity (Id) = Standard_Numeric_Error
- and then Warn_On_Obsolescent_Feature
- then
- Error_Msg_N
- ("Numeric_Error is an " &
- "obsolescent feature ('R'M 'J.6(1))?", Id);
- Error_Msg_N
- ("|use Constraint_Error instead?", Id);
+ if Entity (Id) = Standard_Numeric_Error then
+ Check_Restriction (No_Obsolescent_Features, Id);
+
+ if Warn_On_Obsolescent_Feature then
+ Error_Msg_N
+ ("Numeric_Error is an " &
+ "obsolescent feature ('R'M 'J.6(1))?", Id);
+ Error_Msg_N
+ ("\use Constraint_Error instead?", Id);
+ end if;
end if;
end if;
procedure Analyze_Raise_Statement (N : Node_Id) is
Exception_Id : constant Node_Id := Name (N);
- Exception_Name : Entity_Id := Empty;
+ Exception_Name : Entity_Id := Empty;
P : Node_Id;
Nkind_P : Node_Kind;
("?assignment to pass-by-copy formal may have no effect",
P);
Error_Msg_N
- ("\?RAISE statement is abnormal return" &
+ ("\?RAISE statement may result in abnormal return" &
" ('R'M 6.4.1(17))", P);
end if;
end if;
Error_Msg_N
("exception name expected in raise statement", Exception_Id);
end if;
+
+ if Present (Expression (N)) then
+ Analyze_And_Resolve (Expression (N), Standard_String);
+ end if;
end if;
end Analyze_Raise_Statement;