summaryrefslogtreecommitdiffstats
path: root/gcc/ada/a-except.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-31 17:44:22 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-31 17:44:22 +0000
commit0ad97440188b17cc2f846f1993f25386bfcf43c4 (patch)
tree9bb90d4b54264e437fe69288bbb2c3b9070ecbaa /gcc/ada/a-except.adb
parent54aa575d5b79ea2411858ee5ac9f1194f7befa3f (diff)
downloadppe42-gcc-0ad97440188b17cc2f846f1993f25386bfcf43c4.tar.gz
ppe42-gcc-0ad97440188b17cc2f846f1993f25386bfcf43c4.zip
2006-10-31 Robert Dewar <dewar@adacore.com>
Bob Duff <duff@adacore.com> Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus with multiplying operator. (Expected_Type_Is_Any_Real): New function to determine from the Parent pointer whether the context expects "any real type". (Resolve_Arithmetic_Op): Do not give an error on calls to the universal_fixed "*" and "/" operators when they are used in a context that expects any real type. Also set the type of the node to Universal_Real in this case, because downstream processing requires it (mainly static expression evaluation). Reword some continuation messages Add some \\ sequences to continuation messages (Resolve_Call): Refine infinite recursion case. The test has been sharpened to eliminate some false positives. Check for Current_Task usage now includes entry barrier, and is now a warning, not an error. (Resolve): If the call is ambiguous, indicate whether an interpretation is an inherited operation. (Check_Aggr): When resolving aggregates, skip associations with a box, which are priori correct, and will be replaced by an actual default expression in the course of expansion. (Resolve_Type_Conversion): Add missing support for conversion from a class-wide interface to a tagged type. Minor code cleanup. (Valid_Tagged_Converion): Add support for abstact interface type conversions. (Resolve_Selected_Component): Call Generate_Reference here rather than during analysis, and use May_Be_Lvalue to distinguish read/write. (Valid_Array_Conversion): New procedure, abstracted from Valid_Conversion, to incorporate accessibility checks for arrays of anonymous access types. (Valid_Conversion): For a conversion to a numeric type occurring in an instance or inlined body, no need to check that the operand type is numeric, since this has been checked during analysis of the template. Remove legacy test for scope name Unchecked_Conversion. * sem_res.ads: Minor reformatting * a-except.adb, a-except-2005.adb: Turn off subprogram ordering (PE_Current_Task_In_Entry_Body): New exception code (SE_Restriction_Violation): Removed, not used * a-except.ads: Update comments. * types.h, types.ads: Add definition for Validity_Check (PE_Current_Task_In_Entry_Body): New exception code (SE_Restriction_Violation): Removed, not used git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118232 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-except.adb')
-rw-r--r--gcc/ada/a-except.adb52
1 files changed, 27 insertions, 25 deletions
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb
index 2539501f172..44c7640a1ee 100644
--- a/gcc/ada/a-except.adb
+++ b/gcc/ada/a-except.adb
@@ -31,8 +31,10 @@
-- --
------------------------------------------------------------------------------
--- This version of Ada.Exceptions is a full Ada 95 version, but lacks the
--- additional definitions of Exception_Name returning Wide_[Wide_]String.
+-- This version of Ada.Exceptions is a full Ada 95 version, and Ada 2005
+-- features such as the additional definitions of Exception_Name returning
+-- Wide_[Wide_]String.
+
-- It is used for building the compiler and the basic tools, since these
-- builds may be done with bootstrap compilers that cannot handle these
-- additions. The full version of Ada.Exceptions can be found in the files
@@ -40,6 +42,9 @@
-- 2005 functionality is required. in particular, it is used for building
-- run times on all targets.
+pragma Style_Checks (All_Checks);
+-- No subprogram ordering check, due to logical grouping
+
pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
-- elaboration circularities with System.Exception_Tables.
@@ -206,7 +211,7 @@ package body Ada.Exceptions is
(Excep : EOA;
Current : EOA;
Reraised : Boolean := False);
- -- Dummy routine used to share a-exexda.adb, do nothing.
+ -- Dummy routine used to share a-exexda.adb, do nothing
end Exception_Propagation;
@@ -504,23 +509,24 @@ package body Ada.Exceptions is
Rmsg_14 : constant String := "access before elaboration" & NUL;
Rmsg_15 : constant String := "accessibility check failed" & NUL;
Rmsg_16 : constant String := "all guards closed" & NUL;
- Rmsg_17 : constant String := "duplicated entry address" & NUL;
- Rmsg_18 : constant String := "explicit raise" & NUL;
- Rmsg_19 : constant String := "finalize/adjust raised exception" & NUL;
- Rmsg_20 : constant String := "implicit return with No_Return" & NUL;
- Rmsg_21 : constant String := "misaligned address value" & NUL;
- Rmsg_22 : constant String := "missing return" & NUL;
- Rmsg_23 : constant String := "overlaid controlled object" & NUL;
- Rmsg_24 : constant String := "potentially blocking operation" & NUL;
- Rmsg_25 : constant String := "stubbed subprogram called" & NUL;
- Rmsg_26 : constant String := "unchecked union restriction" & NUL;
- Rmsg_27 : constant String := "illegal use of remote access-to-" &
+ Rmsg_17 : constant String := "Current_Task referenced in entry" &
+ " body" & NUL;
+ Rmsg_18 : constant String := "duplicated entry address" & NUL;
+ Rmsg_19 : constant String := "explicit raise" & NUL;
+ Rmsg_20 : constant String := "finalize/adjust raised exception" & NUL;
+ Rmsg_21 : constant String := "implicit return with No_Return" & NUL;
+ Rmsg_22 : constant String := "misaligned address value" & NUL;
+ Rmsg_23 : constant String := "missing return" & NUL;
+ Rmsg_24 : constant String := "overlaid controlled object" & NUL;
+ Rmsg_25 : constant String := "potentially blocking operation" & NUL;
+ Rmsg_26 : constant String := "stubbed subprogram called" & NUL;
+ Rmsg_27 : constant String := "unchecked union restriction" & NUL;
+ Rmsg_28 : constant String := "illegal use of remote access-to-" &
"class-wide type, see RM E.4(18)" & NUL;
- Rmsg_28 : constant String := "empty storage pool" & NUL;
- Rmsg_29 : constant String := "explicit raise" & NUL;
- Rmsg_30 : constant String := "infinite recursion" & NUL;
- Rmsg_31 : constant String := "object too large" & NUL;
- Rmsg_32 : constant String := "restriction violation" & NUL;
+ Rmsg_29 : constant String := "empty storage pool" & NUL;
+ Rmsg_30 : constant String := "explicit raise" & NUL;
+ Rmsg_31 : constant String := "infinite recursion" & NUL;
+ Rmsg_32 : constant String := "object too large" & NUL;
-----------------------
-- Polling Interface --
@@ -802,11 +808,7 @@ package body Ada.Exceptions is
Raise_Current_Excep (E);
end if;
- -- Note: if E is null, then we simply return, which is correct Ada 95
- -- semantics. If we are operating in Ada 2005 mode, then the expander
- -- generates a raise Constraint_Error immediately following the call
- -- to provide the required Ada 2005 semantics (see AI-329). We do it
- -- this way to avoid having run time dependencies on the Ada version.
+ -- Note: if E is null then just return (Ada 95 semantics)
return;
end Raise_Exception;
@@ -1072,7 +1074,7 @@ package body Ada.Exceptions is
procedure Rcheck_28 (File : System.Address; Line : Integer) is
begin
- Raise_Storage_Error_Msg (File, Line, Rmsg_28'Address);
+ Raise_Program_Error_Msg (File, Line, Rmsg_28'Address);
end Rcheck_28;
procedure Rcheck_29 (File : System.Address; Line : Integer) is
OpenPOWER on IntegriCloud