From b6621d10eb36c29e6965678b7d53aa39eb302c9e Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 4 Aug 2014 09:56:02 +0200 Subject: [multiple changes] 2014-08-04 Hristian Kirtchev * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special cases related to equality. Remove the special processing for dispatching abstract subprograms as it is not needed. (Interpretation_Error): Add a specialized error message for predefined operators. (Is_Intrinsic_Equality): New routine. (Is_Suitable_Candidate): New routine. 2014-08-04 Gary Dismukes * checks.adb: Minor comment reformatting. 2014-08-04 Ed Schonberg * restrict.adb (Check_Restriction): For checked max_parameter restrictions reset Violated flag, so that subsequent violations are properly detected. 2014-08-04 Robert Dewar * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove mode. (Process_Discriminants): Fix bad test of GNATprove mode 2014-08-04 Hristian Kirtchev * sem_ch12.adb (Instantiate_Formal_Subprogram): Move variable to their own section. Propagate the source location of a formal parameter to the corresponding formal of the subprogram renaming declaration. Code reformatting. From-SVN: r213533 --- gcc/ada/checks.adb | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'gcc/ada/checks.adb') diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index bab3ba7..f41df54 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -6407,25 +6407,24 @@ package body Checks is -- a temporary. Then check the converted value against the range of the -- target subtype. - procedure Convert_And_Check_Range is - -- To what does the following comment belong??? - -- We make a temporary to hold the value of the converted value - -- (converted to the base type), and then we will do the test against - -- this temporary. - -- - -- Tnn : constant Target_Base_Type := Target_Base_Type (N); - -- [constraint_error when Tnn not in Target_Type] - -- - -- The conversion itself is replaced by an occurrence of Tnn + ----------------------------- + -- Convert_And_Check_Range -- + ----------------------------- + procedure Convert_And_Check_Range is Tnn : constant Entity_Id := Make_Temporary (Loc, 'T', N); - -- To what does the following comment belong??? - -- Follow the conversion with the explicit range check. Note that we - -- suppress checks for this code, since we don't want a recursive + begin + -- We make a temporary to hold the value of the converted value + -- (converted to the base type), and then do the test against this + -- temporary. The conversion itself is replaced by an occurrence of + -- Tnn and followed by the explicit range check. Note that checks + -- are suppressed for this code, since we don't want a recursive -- range check popping up. - begin + -- Tnn : constant Target_Base_Type := Target_Base_Type (N); + -- [constraint_error when Tnn not in Target_Type] + Insert_Actions (N, New_List ( Make_Object_Declaration (Loc, Defining_Identifier => Tnn, -- cgit v1.1