[multiple changes]
2012-06-12 Robert Dewar <dewar@adacore.com> * sem_ch6.adb: Minor reformatting. 2012-06-12 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi: Couple of minor corrections. 2012-06-12 Thomas Quinot <quinot@adacore.com> * sem_prag.adb (Check_Variant): An empty component list is not illegal in an unchecked union variant. From-SVN: r188436
This commit is contained in:
parent
70f4ad204d
commit
586ecbf363
4 changed files with 21 additions and 16 deletions
|
@ -1,3 +1,16 @@
|
|||
2012-06-12 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* sem_ch6.adb: Minor reformatting.
|
||||
|
||||
2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat_ugn.texi: Couple of minor corrections.
|
||||
|
||||
2012-06-12 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* sem_prag.adb (Check_Variant): An empty component list is not
|
||||
illegal in an unchecked union variant.
|
||||
|
||||
2012-06-12 Gary Dismukes <dismukes@adacore.com>
|
||||
|
||||
* projects.texi: Remove comments.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue