From: Arnaud Charlet Date: Wed, 15 Apr 2009 08:48:39 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8aadf012f8eea411209f89b9366bf9af219ccc3;p=gcc.git [multiple changes] 2009-04-15 Gary Dismukes * 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 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Verify that a private extension whose parent is a synchronized interface carries an explicit synchronized keyword. From-SVN: r146084 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a06875469d6..caf4b88855c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2009-04-15 Gary Dismukes + + * 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 + + * 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 * exp_smem.adb (Make_Shared_Var_Procs): For a protected type, diff --git a/gcc/ada/a-tasatt.adb b/gcc/ada/a-tasatt.adb index 10d29b61e42..b1a6b2da52d 100644 --- a/gcc/ada/a-tasatt.adb +++ b/gcc/ada/a-tasatt.adb @@ -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 + -- a case anyway, so the warning can be safely ignored. pragma Warnings (Off); To_Attribute_Handle (Local.Initial_Value'Access).all := diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index a4a9254c786..a5a25fd8a79 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -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. diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 620be02a315..b577aa3ac5e 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -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; diff --git a/gcc/ada/sem_ch3.ads b/gcc/ada/sem_ch3.ads index 076966a0f17..9375070125b 100644 --- a/gcc/ada/sem_ch3.ads +++ b/gcc/ada/sem_ch3.ads @@ -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