diff options
author | Robert Dewar <dewar@adacore.com> | 2006-10-31 18:44:22 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2006-10-31 18:44:22 +0100 |
commit | aa1806136c169334a389a8ed9d69fff1521ad42b (patch) | |
tree | 9bb90d4b54264e437fe69288bbb2c3b9070ecbaa /gcc/ada/a-except.ads | |
parent | 524c02d73cada8610253a83558a02ebc5ba9ed25 (diff) | |
download | gcc-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/a-except.ads')
-rw-r--r-- | gcc/ada/a-except.ads | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/ada/a-except.ads b/gcc/ada/a-except.ads index e010c56..2dae518 100644 --- a/gcc/ada/a-except.ads +++ b/gcc/ada/a-except.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. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -35,8 +35,7 @@ -- -- ------------------------------------------------------------------------------ --- 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. -- 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 @@ -57,14 +56,17 @@ package Ada.Exceptions is pragma Warnings (Off); pragma Preelaborate_05; pragma Warnings (On); - -- In accordance with Ada 2005 AI-362. The warnings pragmas are so that we - -- can compile this using older compiler versions, which will ignore the - -- pragma, which is fine for the bootstrap. + -- We make this preelaborable in Ada 2005 mode. If we did not do this, then + -- run time units used by the compiler (e.g. s-soflin.ads) would run + -- into trouble. Conformance is not an issue, since this version is used + -- only by the compiler. type Exception_Id is private; + Null_Id : constant Exception_Id; type Exception_Occurrence is limited private; + type Exception_Occurrence_Access is access all Exception_Occurrence; Null_Occurrence : constant Exception_Occurrence; @@ -76,11 +78,11 @@ package Ada.Exceptions is procedure Raise_Exception (E : Exception_Id; Message : String := ""); -- Note: it would be really nice to give a pragma No_Return for this - -- procedure, but it would be wrong, since Raise_Exception does return - -- if given the null exception. However we do special case the name in - -- the test in the compiler for issuing a warning for a missing return - -- after this call. Program_Error seems reasonable enough in such a case. - -- See also the routine Raise_Exception_Always in the private part. + -- procedure, but it would be wrong, since Raise_Exception does return if + -- given the null exception in Ada 95 mode. However we do special case the + -- name in the test in the compiler for issuing a warning for a missing + -- return after this call. Program_Error seems reasonable enough in such a + -- case. See also the routine Raise_Exception_Always in the private part. function Exception_Message (X : Exception_Occurrence) return String; |