]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
exp_ch5.adb, [...]: Minor reformatting.
authorRobert Dewar <dewar@adacore.com>
Tue, 4 Feb 2014 14:52:05 +0000 (14:52 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 4 Feb 2014 14:52:05 +0000 (15:52 +0100)
2014-02-04  Robert Dewar  <dewar@adacore.com>

* exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.

From-SVN: r207470

gcc/ada/ChangeLog
gcc/ada/einfo.ads
gcc/ada/exp_ch5.adb
gcc/ada/freeze.adb
gcc/ada/sem_ch8.adb

index 8f43cfe9de6467ffb37c956a7ff72a2482c41c49..84171985fb3d1125c1f805929864b82a4d16cd87 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-04  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
+
 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
 
        * sem_aggr.adb: Change "runtime" to "run time" in warning message,
index fae25dee0fdc5a7a8f947e486a11acf9c78f578d..18a1e18d1c94041e5e0263174b6146fa9788446b 100644 (file)
@@ -2775,7 +2775,7 @@ package Einfo is
 
 --    Is_Pure (Flag44)
 --       Defined in all entities. Set in all entities of a unit to which a
---       pragma Pure is applied except for non intrinsic imported subprogram,
+--       pragma Pure is applied except for non-intrinsic imported subprograms,
 --       and also set for the entity of the unit itself. In addition, this
 --       flag may be set for any other functions or procedures that are known
 --       to be side effect free, so in the case of subprograms, the Is_Pure
index d64d0c82a93ec5fd953c0e1a9e6ab96291a90685..a65365b2595da45f4e2eb39532787a7295249c06 100644 (file)
@@ -3132,7 +3132,7 @@ package body Exp_Ch5 is
                --  the element is a constant in the loop.
 
                if No (Find_Value_Of_Aspect
-                       (Container_Typ, Aspect_Variable_Indexing))
+                        (Container_Typ, Aspect_Variable_Indexing))
                then
                   Set_Ekind (Id, E_Constant);
                end if;
index ad74fba927b8eb4f7abee36aca33f19aeadc68b2..93e7248abff3b076338f025bb366eb32f2def951 100644 (file)
@@ -6521,6 +6521,11 @@ package body Freeze is
       --  can bypass the normal check to ensure that pure units call only pure
       --  subprograms.
 
+      --  The reason for the intrinsic exception is that in general, intrinsic
+      --  functions (such as shifts) are pure anyway. The only exceptions are
+      --  the intrinsics in GNAT.Source_Info, and that unit is not marked Pure
+      --  in any case, so no problem arises.
+
       if Is_Imported (E)
         and then Is_Pure (E)
         and then not Has_Pragma_Pure_Function (E)
index da5c6002ac1ebe21cd12bb84258416bb3b2eac77..bb9894711a351b923bc82fd6ca1bd07ae861b778 100644 (file)
@@ -1195,7 +1195,8 @@ package body Sem_Ch8 is
 
       --  Set the Ekind of the entity, unless it has been set already, as is
       --  the case for the iteration object over a container with no variable
-      --  indexing.
+      --  indexing. In that case it's been marked as a constant, and we do not
+      --  want to change it to a variable.
 
       if Ekind (Id) /= E_Constant then
          Set_Ekind (Id, E_Variable);