aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/types.ads
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2006-10-31 18:44:22 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2006-10-31 18:44:22 +0100
commitaa1806136c169334a389a8ed9d69fff1521ad42b (patch)
tree9bb90d4b54264e437fe69288bbb2c3b9070ecbaa /gcc/ada/types.ads
parent524c02d73cada8610253a83558a02ebc5ba9ed25 (diff)
downloadgcc-aa1806136c169334a389a8ed9d69fff1521ad42b.zip
gcc-aa1806136c169334a389a8ed9d69fff1521ad42b.tar.gz
gcc-aa1806136c169334a389a8ed9d69fff1521ad42b.tar.bz2
sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus with multiplying operator.
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 From-SVN: r118232
Diffstat (limited to 'gcc/ada/types.ads')
-rw-r--r--gcc/ada/types.ads47
1 files changed, 25 insertions, 22 deletions
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index f29ec01..eccae6e 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -106,10 +106,11 @@ package Types is
subtype Line_Terminator is Character range ASCII.LF .. ASCII.CR;
-- Line terminator characters (LF, VT, FF, CR)
+ --
-- This definition is dubious now that we have two more wide character
-- sequences that constitute a line terminator. Every reference to
-- this subtype needs checking to make sure the wide character case
- -- is handled appropriately.
+ -- is handled appropriately. ???
subtype Upper_Half_Character is
Character range Character'Val (16#80#) .. Character'Val (16#FF#);
@@ -206,7 +207,7 @@ package Types is
No_Location : constant Source_Ptr := -1;
-- Value used to indicate no source position set in a node. A test for
- -- a Source_Ptr value being >= No_Location is the apporoved way to test
+ -- a Source_Ptr value being > No_Location is the approved way to test
-- for a standard value that does not include No_Location or any of the
-- following special definitions.
@@ -683,9 +684,10 @@ package Types is
-- Types used for Pragma Suppress Management --
-----------------------------------------------
- type Check_Id is (
- Access_Check,
+ type Check_Id is
+ (Access_Check,
Accessibility_Check,
+ Alignment_Check,
Discriminant_Check,
Division_Check,
Elaboration_Check,
@@ -695,6 +697,7 @@ package Types is
Range_Check,
Storage_Check,
Tag_Check,
+ Validity_Check,
All_Checks);
-- The following array contains an entry for each recognized check name
@@ -804,23 +807,23 @@ package Types is
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
+ PE_Current_Task_In_Entry_Body, -- 17
+ PE_Duplicated_Entry_Address, -- 18
+ PE_Explicit_Raise, -- 19
+ PE_Finalize_Raised_Exception, -- 20
+ PE_Implicit_Return, -- 21
+ PE_Misaligned_Address_Value, -- 22
+ PE_Missing_Return, -- 23
+ PE_Overlaid_Controlled_Object, -- 24
+ PE_Potentially_Blocking_Operation, -- 25
+ PE_Stubbed_Subprogram_Called, -- 26
+ PE_Unchecked_Union_Restriction, -- 27
+ PE_Illegal_RACW_E_4_18, -- 28
+
+ SE_Empty_Storage_Pool, -- 29
+ SE_Explicit_Raise, -- 30
+ SE_Infinite_Recursion, -- 31
+ SE_Object_Too_Large); -- 32
subtype RT_CE_Exceptions is RT_Exception_Code range
CE_Access_Check_Failed ..
@@ -832,6 +835,6 @@ package Types is
subtype RT_SE_Exceptions is RT_Exception_Code range
SE_Empty_Storage_Pool ..
- SE_Restriction_Violation;
+ SE_Object_Too_Large;
end Types;