* 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
+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,
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
+ -- a case anyway, so the warning can be safely ignored.
pragma Warnings (Off);
To_Attribute_Handle (Local.Initial_Value'Access).all :=
-- 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.
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;
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