OSDN Git Service

2009-04-15 Gary Dismukes <dismukes@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Apr 2009 08:48:39 +0000 (08:48 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Apr 2009 08:48:39 +0000 (08:48 +0000)
* a-tasatt.adb: Fix typo, plus minor reformatting

* sem_ch3.ads: Add missing hyphen ("class wide" => "class-wide").

* sem_ch10.adb: Add missing hyphen ("use visible" => "use-visible").

2009-04-15  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Analyze_Private_Extension_Declaration): Verify that a
private extension whose parent is a synchronized interface carries an
explicit synchronized keyword.

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

gcc/ada/ChangeLog
gcc/ada/a-tasatt.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch3.ads

index a068754..caf4b88 100644 (file)
@@ -1,3 +1,17 @@
+2009-04-15  Gary Dismukes  <dismukes@adacore.com>
+
+       * a-tasatt.adb: Fix typo, plus minor reformatting
+
+       * sem_ch3.ads: Add missing hyphen ("class wide" => "class-wide").
+
+       * sem_ch10.adb: Add missing hyphen ("use visible" => "use-visible").
+
+2009-04-15  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch3.adb (Analyze_Private_Extension_Declaration): Verify that a
+       private extension whose parent is a synchronized interface carries an
+       explicit synchronized keyword.
+
 2009-04-15  Thomas Quinot  <quinot@adacore.com>
 
        * exp_smem.adb (Make_Shared_Var_Procs): For a protected type,
index 10d29b6..b1a6b2d 100644 (file)
@@ -719,9 +719,9 @@ begin
                In_Use := In_Use or Two_To_J;
                Local.Index := J;
 
-               --  This unchecked conversions can give a warning when the
-               --  alignment is incorrect, but it will not be used in such a
-               --  case anyway, so the warning can be safely ignored.
+               --  This unchecked conversion can give a warning when the
+               --  alignment is incorrect, but it will not be used in such
+               --  case anyway, so the warning can be safely ignored.
 
                pragma Warnings (Off);
                To_Attribute_Handle (Local.Initial_Value'Access).all :=
index a4a9254..a5a25fd 100644 (file)
@@ -1292,7 +1292,7 @@ package body Sem_Ch10 is
          --  the implicit with's on parent units.
 
          --  Skip use clauses at this stage, since we don't want to do any
-         --  installing of potentially use visible entities until we
+         --  installing of potentially use-visible entities until we
          --  actually install the complete context (in Install_Context).
          --  Otherwise things can get installed in the wrong context.
 
index 620be02..b577aa3 100644 (file)
@@ -3337,6 +3337,18 @@ package body Sem_Ch3 is
             Error_Msg_NE ("parent type& of limited extension must be limited",
               N, Parent_Type);
          end if;
+
+      --  A consequence of 3.9.4 (6/2) and 7.3 (2.2/2) is that a private
+      --  extension with a synchronized parent must be explicitly declared
+      --  synchronized, because the full view will be a synchronized type.
+
+      elsif Is_Interface (Parent_Type)
+        and then Is_Synchronized_Interface (Parent_Type)
+        and then not Synchronized_Present (N)
+      then
+         Error_Msg_NE
+           ("private extension of& must be explicitly synchronized",
+             N, Parent_Type);
       end if;
    end Analyze_Private_Extension_Declaration;
 
index 076966a..9375070 100644 (file)
@@ -177,10 +177,10 @@ package Sem_Ch3 is
 
    procedure Make_Class_Wide_Type (T : Entity_Id);
    --  A Class_Wide_Type is created for each tagged type definition. The
-   --  attributes of a class wide type are inherited from those of the type T.
+   --  attributes of a class-wide type are inherited from those of the type T.
    --  If T is introduced by a private declaration, the corresponding class
    --  wide type is created at the same time, and therefore there is a private
-   --  and a full declaration for the class wide type as well.
+   --  and a full declaration for the class-wide type as well.
 
    function OK_For_Limited_Init_In_05 (Exp : Node_Id) return Boolean;
    --  Presuming Exp is an expression of an inherently limited type, returns