From: Arnaud Charlet Date: Tue, 12 Jun 2012 10:05:20 +0000 (+0200) Subject: [multiple changes] X-Git-Tag: upstream/12.2.0~75848 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=586ecbf363a2a4209c5bacc0d292f3bf08f784e1;p=platform%2Fupstream%2Fgcc.git [multiple changes] 2012-06-12 Robert Dewar * sem_ch6.adb: Minor reformatting. 2012-06-12 Eric Botcazou * gnat_ugn.texi: Couple of minor corrections. 2012-06-12 Thomas Quinot * sem_prag.adb (Check_Variant): An empty component list is not illegal in an unchecked union variant. From-SVN: r188436 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a5a2548..c10eef0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2012-06-12 Robert Dewar + + * sem_ch6.adb: Minor reformatting. + +2012-06-12 Eric Botcazou + + * gnat_ugn.texi: Couple of minor corrections. + +2012-06-12 Thomas Quinot + + * sem_prag.adb (Check_Variant): An empty component list is not + illegal in an unchecked union variant. + 2012-06-12 Gary Dismukes * projects.texi: Remove comments. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 8380530..825c8a4 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -10618,13 +10618,13 @@ Any one of the following applies: @code{pragma Inline} is applied to the subprogram and the @option{^-gnatn^/INLINE^} switch is specified; the subprogram is local to the unit and called once from within it; the subprogram is small and optimization level @option{-O2} is specified; -optimization level @option{-O3}) is specified. +optimization level @option{-O3} is specified. @end itemize @noindent Calls to subprograms in @code{with}'ed units are normally not inlined. To achieve actual inlining (that is, replacement of the call by the code -in the body of the subprogram), the following conditions must all be true. +in the body of the subprogram), the following conditions must all be true: @itemize @bullet @item diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 80e07fd..c69bf91 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -7416,6 +7416,7 @@ package body Sem_Ch6 is -- The following is too permissive. A more precise test should -- check that the generic actual is an ancestor subtype of the -- other ???. + -- See code in Find_Corresponding_Spec that applies an additional -- filter to handle accidental amiguities in instances. @@ -8164,19 +8165,17 @@ package body Sem_Ch6 is begin if Ekind (E) = E_Function - and then Is_Generic_Actual_Type (Etype (E)) - /= Is_Generic_Actual_Type (Etype (Designator)) + and then Is_Generic_Actual_Type (Etype (E)) /= + Is_Generic_Actual_Type (Etype (Designator)) then return True; end if; F1 := First_Formal (Designator); F2 := First_Formal (E); - while Present (F1) loop - if - Is_Generic_Actual_Type (Etype (F1)) - /= Is_Generic_Actual_Type (Etype (F2)) + if Is_Generic_Actual_Type (Etype (F1)) /= + Is_Generic_Actual_Type (Etype (F2)) then return True; end if; @@ -8202,7 +8201,7 @@ package body Sem_Ch6 is if Scope (E) = Current_Scope then if Current_Scope = Standard_Standard or else (Ekind (E) = Ekind (Designator) - and then Type_Conformant (E, Designator)) + and then Type_Conformant (E, Designator)) then -- Within an instantiation, we know that spec and body are -- subtype conformant, because they were subtype conformant in diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index fa41b2c..cbcc0be 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -2483,13 +2483,6 @@ package body Sem_Prag is Comp : Node_Id; begin - if not Is_Non_Empty_List (Component_Items (Clist)) then - Error_Msg_N - ("Unchecked_Union may not have empty component list", - Variant); - return; - end if; - Comp := First (Component_Items (Clist)); while Present (Comp) loop Check_Component (Comp, UU_Typ, In_Variant_Part => True);