OSDN Git Service

2010-10-08 Ed Schonberg <schonberg@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 2010 13:10:27 +0000 (13:10 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 2010 13:10:27 +0000 (13:10 +0000)
* sem_aux.adb: Cleanup Is_Immutably_Limited_Type.

2010-10-08  Robert Dewar  <dewar@adacore.com>

* exp_ch3.adb: Minor reformatting.
* exp_ch5.adb: Add comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165177 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch5.adb
gcc/ada/sem_aux.adb

index 208867f..4543c69 100644 (file)
@@ -1,3 +1,12 @@
+2010-10-08  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_aux.adb: Cleanup Is_Immutably_Limited_Type.
+
+2010-10-08  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch3.adb: Minor reformatting.
+       * exp_ch5.adb: Add comment.
+
 2010-10-08  Robert Dewar  <dewar@adacore.com>
 
        * sem_prag.adb (Check_Duplicate_Pragma): Check for entity match
index 7dc6842..156a83d 100644 (file)
@@ -6198,7 +6198,8 @@ package body Exp_Ch3 is
             end if;
          end;
 
-      --  Otherwise create primitive equality operation  (AI05-0123)
+      --  Otherwise create primitive equality operation (AI05-0123)
+
       --  This is done unconditionally to ensure that tools can be linked
       --  properly with user programs compiled with older language versions.
       --  It might be worth including a switch to revert to a non-composable
index 2c2ddb0..f53ac1f 100644 (file)
@@ -4247,9 +4247,11 @@ package body Exp_Ch5 is
                 Reason => PE_Accessibility_Check_Failed));
          end;
 
-      --  AI05-0073 : if function has a controlling access result, check that
+      --  AI05-0073: If function has a controlling access result, check that
       --  the tag of the return value matches the designated type.
 
+      --  The "or else True" needs commenting here ???
+
       elsif Ekind (R_Type) = E_Anonymous_Access_Type
         and then Has_Controlling_Result (Scope_Id)
         and then (Ada_Version >= Ada_12 or else True)
index c1a41ce..bfe57f0 100755 (executable)
@@ -578,14 +578,13 @@ package body Sem_Aux is
       Btype : constant Entity_Id := Base_Type (Ent);
 
    begin
-      if Ekind (Btype) = E_Limited_Private_Type then
-         if Nkind (Parent (Btype)) = N_Formal_Type_Declaration then
-            return not In_Package_Body (Scope ((Btype)));
-         else
-            return True;
-         end if;
+      if Ekind (Btype) = E_Limited_Private_Type
+        and then Nkind (Parent (Btype)) = N_Formal_Type_Declaration
+      then
+         return not In_Package_Body (Scope ((Btype)));
+      end if;
 
-      elsif Is_Private_Type (Btype) then
+      if Is_Private_Type (Btype) then
          --  AI05-0063 : a type derived from a limited private formal type
          --  is not immutably limited in a generic body.