aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/types.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2006-02-15 10:31:54 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2006-02-15 10:31:54 +0100
commit6f301919dc530893fa43e994531ff347f955000a (patch)
tree14eb42b222454b2b7f3b3060688e866bdb0b0127 /gcc/ada/types.ads
parent5b47742c2d278f8f8a4b1e02c6e1f786340da38f (diff)
downloadgcc-6f301919dc530893fa43e994531ff347f955000a.zip
gcc-6f301919dc530893fa43e994531ff347f955000a.tar.gz
gcc-6f301919dc530893fa43e994531ff347f955000a.tar.bz2
2006-02-13 Arnaud Charlet <charlet@adacore.com>
Robert Dewar <dewar@adacore.com> * a-exexpr.adb, a-exexpr-gcc.adb (Process_Raise_Exception): Removed, merged with Propagate_Exception. (Propagate_Exception): Now take extra From_Signal_Handler parameter. Remove code unused for exception propagation for the compiler itself from a-except.adb and update to still share separate packages. * a-except.ads, a-except.adb: Ditto. Add comments that this version is now used only by the compiler and other basic tools. The full version that includes the Ada 2005 stuff is in separate files a-except-2005.ads/adb. The reason is that we do not want to cause bootstrap problems with compilers not recognizing Wide_Wide_String. Add exception reason code PE_Implicit_Return Add new exception reason code (Null Exception_Id) * a-except-2005.adb, a-except-2005.ads: New files. * s-wchcon.ads: (Get_WC_Encoding_Method): New function. * s-wchcon.adb: New file. * Makefile.in (LIBGNAT_SRCS): Add tb-gcc.c. (traceback.o deps): Likewise. (SPARC/Solaris): Accept sparc[64|v9]-sun-solaris. Activate build of GMEM instrumentation library on VMS targets. (gnatlib-sjlj, gnatlib-zcx): Pass EH_MECHANISM to make gnatlib. Use a-except-2005.ads/adb for all run-time library builds unless specified otherwise. [VMS] (LIBGNAT_TARGET_PAIRS_AUX1,2): Rename s-parame-vms.ads to s-parame-vms-alpha.ads and add s-parame-vms-ia64.ads. Use s-parame.adb on all native platforms. Use s-parame-vxworks.adb on all vxworks platforms. Add env.c env.h in LIBGNAT_SRCS Add env.o in LIBGNAT_OBJS (GNATMAKE_OBJS): Remove ctrl_c.o object. (LIBGNAT_TARGET_PAIRS for x86-vxworks): Use an specialized version of s-osinte.adb, s-tpopsp.adb, and system.ads for the run time that supports VxWorks 6 RTPs. (EXTRA_GNATRTL_NONTASKING_OBJS for x86-vxworks): Remove the use of i-vxworks and i-vxwoio from the run time that supports VxWorks 6 RTPs. * types.h, types.ads (Terminate_Program): New exception Add comment on modifying multiple versions of a-except.adb when the table of exception reasons is modified. Add exception reason code PE_Implicit_Return Add new exception reason code (Null Exception_Id) * clean.adb (Initialize): Get the target parameters before checking if target is OpenVMS. Move the OpenVMS specific code here from package body elaboration code. From-SVN: r111031
Diffstat (limited to 'gcc/ada/types.ads')
-rw-r--r--gcc/ada/types.ads87
1 files changed, 49 insertions, 38 deletions
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index a2a9927..f29ec01 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, 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- --
@@ -725,7 +725,7 @@ package Types is
-----------------------------------
-- This section contains declarations of exceptions that are used
- -- throughout the compiler.
+ -- throughout the compiler or in other GNAT tools.
Unrecoverable_Error : exception;
-- This exception is raised to immediately terminate the compilation
@@ -734,6 +734,14 @@ package Types is
-- reached, or a required file is not found). Also raised when the
-- compiler finds itself in trouble after an error (see Comperr).
+ Terminate_Program : exception;
+ -- This exception is raised to immediately terminate the tool being
+ -- executed. Each tool where this exception may be raised must have
+ -- a single exception handler that contains only a null statement and
+ -- that is the last statement of the program. If needed, procedure
+ -- Set_Exit_Status is called with the appropriate exit status before
+ -- raising Terminate_Program.
+
---------------------------------
-- Parameter Mechanism Control --
---------------------------------
@@ -774,42 +782,45 @@ package Types is
-- the definition of last_reason_code.
-- 3. Add a new routine in Ada.Exceptions with the appropriate call
- -- and static string constant
-
- type RT_Exception_Code is (
- CE_Access_Check_Failed,
- CE_Access_Parameter_Is_Null,
- CE_Discriminant_Check_Failed,
- CE_Divide_By_Zero,
- CE_Explicit_Raise,
- CE_Index_Check_Failed,
- CE_Invalid_Data,
- CE_Length_Check_Failed,
- CE_Null_Not_Allowed,
- CE_Overflow_Check_Failed,
- CE_Partition_Check_Failed,
- CE_Range_Check_Failed,
- CE_Tag_Check_Failed,
-
- PE_Access_Before_Elaboration,
- PE_Accessibility_Check_Failed,
- PE_All_Guards_Closed,
- PE_Duplicated_Entry_Address,
- PE_Explicit_Raise,
- PE_Finalize_Raised_Exception,
- PE_Misaligned_Address_Value,
- PE_Missing_Return,
- PE_Overlaid_Controlled_Object,
- PE_Potentially_Blocking_Operation,
- PE_Stubbed_Subprogram_Called,
- PE_Unchecked_Union_Restriction,
- PE_Illegal_RACW_E_4_18,
-
- SE_Empty_Storage_Pool,
- SE_Explicit_Raise,
- SE_Infinite_Recursion,
- SE_Object_Too_Large,
- SE_Restriction_Violation);
+ -- and static string constant. Note that there is more than one
+ -- version of a-except.adb which must be modified.
+
+ type RT_Exception_Code is
+ (CE_Access_Check_Failed, -- 00
+ CE_Access_Parameter_Is_Null, -- 01
+ CE_Discriminant_Check_Failed, -- 02
+ CE_Divide_By_Zero, -- 03
+ CE_Explicit_Raise, -- 04
+ CE_Index_Check_Failed, -- 05
+ CE_Invalid_Data, -- 06
+ CE_Length_Check_Failed, -- 07
+ CE_Null_Exception_Id, -- 08
+ CE_Null_Not_Allowed, -- 09
+ CE_Overflow_Check_Failed, -- 10
+ CE_Partition_Check_Failed, -- 11
+ CE_Range_Check_Failed, -- 12
+ CE_Tag_Check_Failed, -- 13
+
+ PE_Access_Before_Elaboration, -- 14
+ PE_Accessibility_Check_Failed, -- 15
+ PE_All_Guards_Closed, -- 16
+ PE_Duplicated_Entry_Address, -- 17
+ PE_Explicit_Raise, -- 18
+ PE_Finalize_Raised_Exception, -- 19
+ PE_Implicit_Return, -- 20
+ PE_Misaligned_Address_Value, -- 21
+ PE_Missing_Return, -- 22
+ PE_Overlaid_Controlled_Object, -- 23
+ PE_Potentially_Blocking_Operation, -- 24
+ PE_Stubbed_Subprogram_Called, -- 25
+ PE_Unchecked_Union_Restriction, -- 26
+ PE_Illegal_RACW_E_4_18, -- 27
+
+ SE_Empty_Storage_Pool, -- 28
+ SE_Explicit_Raise, -- 29
+ SE_Infinite_Recursion, -- 30
+ SE_Object_Too_Large, -- 31
+ SE_Restriction_Violation); -- 32
subtype RT_CE_Exceptions is RT_Exception_Code range
CE_Access_Check_Failed ..