[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 4 Aug 2014 10:11:51 +0000 (12:11 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 4 Aug 2014 10:11:51 +0000 (12:11 +0200)
2014-08-04  Robert Dewar  <dewar@adacore.com>

* exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.

2014-08-04  Arnaud Charlet  <charlet@adacore.com>

* sem_ch4.adb (Operator_Check): Refine previous change.

From-SVN: r213561

gcc/ada/ChangeLog
gcc/ada/einfo.ads
gcc/ada/exp_ch5.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_ch5.adb

index 441e2a0fb5cea1a100cf40aaa22bb7fa962c2cc9..5684a668265cf5ed1c118d4f7a941488f172bef8 100644 (file)
@@ -1,3 +1,11 @@
+2014-08-04  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
+
+2014-08-04  Arnaud Charlet  <charlet@adacore.com>
+
+       * sem_ch4.adb (Operator_Check): Refine previous change.
+
 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
 
        * sem_scil.ads: Improve comments.
index 7dd8257e009fea9525e6b8891fc0ee03eacb69e4..23516be761236b4990d348cc5faa9f8919431a15 100644 (file)
@@ -2844,9 +2844,9 @@ package Einfo is
 --       as well as for record with private types as subtypes
 
 --    Is_Processed_Transient (Flag252)
---       Defined in entities of variables and constants, including the loop
---       parameters of generalized iterators. Set when a transient object needs
---       to be finalized and it has already been processed by the transient
+--       Defined in variables, loop parameters, and constants, including the
+--       loop parameters of generalized iterators. Set when a transient object
+--       needs to be finalized and has already been processed by the transient
 --       scope machinery. This flag signals the general finalization mechanism
 --       to ignore the transient object.
 
index 363279580a2db86f72fbd7382b8e2f43480c6813..12c50a152f2a2e323aec7c9994e2ebe99738ad8c 100644 (file)
@@ -3198,8 +3198,8 @@ package body Exp_Ch5 is
       Id     : constant Entity_Id  := Defining_Identifier (I_Spec);
       Loc    : constant Source_Ptr := Sloc (N);
 
-      Container     : constant Node_Id   := Name (I_Spec);
-      Container_Typ : constant Entity_Id := Base_Type (Etype (Container));
+      Container     : constant Node_Id     := Name (I_Spec);
+      Container_Typ : constant Entity_Id   := Base_Type (Etype (Container));
       I_Kind        : constant Entity_Kind := Ekind (Id);
       Cursor        : Entity_Id;
       Iterator      : Entity_Id;
@@ -3594,7 +3594,7 @@ package body Exp_Ch5 is
             --  The cursor is only modified in expanded code, so it appears
             --  as unassigned to the warning machinery. We must suppress
             --  this spurious warning explicitly. The cursor's kind is that of
-            --  the original loop parameter (it is a constant if the doamin of
+            --  the original loop parameter (it is a constant if the domain of
             --  iteration is constant).
 
             Set_Warnings_Off (Cursor);
index c675f056ccf41ea7e13ed1a26e0f1731756ae461..6c260313c9c75e91ce8c5e0a45e1847ac759071c 100644 (file)
@@ -6446,14 +6446,6 @@ package body Sem_Ch4 is
                   return;
                end if;
 
-            elsif Nkind_In (N, N_Op_Eq, N_Op_Ne) then
-               if Address_Integer_Convert_OK (Etype (R), Etype (L)) then
-                  Rewrite (R,
-                    Unchecked_Convert_To (Etype (L), Relocate_Node (R)));
-                  Analyze_Equality_Op (N);
-                  return;
-               end if;
-
             --  For an arithmetic operator or comparison operator, if one
             --  of the operands is numeric, then we know the other operand
             --  is not the same numeric type. If it is a non-numeric type,
@@ -6608,6 +6600,14 @@ package body Sem_Ch4 is
                end if;
 
                return;
+
+            elsif Nkind_In (N, N_Op_Eq, N_Op_Ne) then
+               if Address_Integer_Convert_OK (Etype (R), Etype (L)) then
+                  Rewrite (R,
+                    Unchecked_Convert_To (Etype (L), Relocate_Node (R)));
+                  Analyze_Equality_Op (N);
+                  return;
+               end if;
             end if;
 
             --  If we fall through then just give general message. Note that in
index 8552a7caaa0d1cb07867d64120f2b7633b5d93b4..4ece78b8e9897b992e1b3f3481d30bfe73c896ec 100644 (file)
@@ -3114,8 +3114,8 @@ package body Sem_Ch5 is
       --  If the expander is not active, or in SPARK mode, then we want to
       --  analyze the loop body now even in the Ada 2012 iterator case, since
       --  the rewriting will not be done. Insert the loop variable in the
-      --  current scope, if not done when analysing the iteration scheme. Set
-      --  is kind properly to detect improper uses in the loop body.
+      --  current scope, if not done when analysing the iteration scheme.
+      --  Set its kind properly to detect improper uses in the loop body.
 
       if Present (Iter)
         and then Present (Iterator_Specification (Iter))