mirror of git://gcc.gnu.org/git/gcc.git
sem_ch6.adb: Minor code clean up.
2009-04-10 Robert Dewar <dewar@adacore.com> * sem_ch6.adb: Minor code clean up. * einfo.ads, sem_attr.adb: Minor comment fixes. * sem_ch8.adb: Minor reformatting From-SVN: r145905
This commit is contained in:
parent
7ca78bba4d
commit
701b7fbbff
|
@ -1,3 +1,13 @@
|
||||||
|
2009-04-10 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* sem_ch6.adb: Minor code clean up.
|
||||||
|
|
||||||
|
* einfo.ads, sem_attr.adb: Minor comment fixes.
|
||||||
|
|
||||||
|
2009-04-10 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* sem_ch8.adb: Minor reformatting
|
||||||
|
|
||||||
2009-04-10 Robert Dewar <dewar@adacore.com>
|
2009-04-10 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
* einfo.ads, einfo.adb (Postcondition_Proc): New attribute for
|
* einfo.ads, einfo.adb (Postcondition_Proc): New attribute for
|
||||||
|
|
|
@ -5145,7 +5145,7 @@ package Einfo is
|
||||||
|
|
||||||
-- E_Procedure
|
-- E_Procedure
|
||||||
-- E_Generic_Procedure
|
-- E_Generic_Procedure
|
||||||
-- Postcondition_Proc (Node8)
|
-- Postcondition_Proc (Node8) (non-generic case only)
|
||||||
-- Renaming_Map (Uint9)
|
-- Renaming_Map (Uint9)
|
||||||
-- Handler_Records (List10) (non-generic case only)
|
-- Handler_Records (List10) (non-generic case only)
|
||||||
-- Protected_Body_Subprogram (Node11)
|
-- Protected_Body_Subprogram (Node11)
|
||||||
|
|
|
@ -3827,7 +3827,7 @@ package body Sem_Attr is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- Body case, where we must be inside a generated _Postcondition
|
-- Body case, where we must be inside a generated _Postcondition
|
||||||
-- procedure, and the prefix must be on the scope stack, or else
|
-- procedure, and the prefix must be on the scope stack, or else
|
||||||
-- the attribute use is definitely misplaced. The condition itself
|
-- the attribute use is definitely misplaced. The condition itself
|
||||||
-- may have generated transient scopes, and is not necessarily the
|
-- may have generated transient scopes, and is not necessarily the
|
||||||
-- current one.
|
-- current one.
|
||||||
|
|
|
@ -1869,9 +1869,11 @@ package body Sem_Ch6 is
|
||||||
|
|
||||||
Check_Inline_Pragma (Spec_Id);
|
Check_Inline_Pragma (Spec_Id);
|
||||||
|
|
||||||
-- Case of fully private operation in the body of the protected type.
|
-- Deal with special case of a fully private operation in the body of
|
||||||
-- We must create a declaration for the subprogram, in order to attach
|
-- the protected type. We must create a declaration for the subprogram,
|
||||||
-- the protected subprogram that will be used in internal calls.
|
-- in order to attach the protected subprogram that will be used in
|
||||||
|
-- internal calls. We exclude compiler generated bodies from the
|
||||||
|
-- expander since the issue does not arise for those cases.
|
||||||
|
|
||||||
if No (Spec_Id)
|
if No (Spec_Id)
|
||||||
and then Comes_From_Source (N)
|
and then Comes_From_Source (N)
|
||||||
|
@ -1932,10 +1934,11 @@ package body Sem_Ch6 is
|
||||||
Set_Has_Completion (Spec_Id);
|
Set_Has_Completion (Spec_Id);
|
||||||
Set_Convention (Spec_Id, Convention_Protected);
|
Set_Convention (Spec_Id, Convention_Protected);
|
||||||
end;
|
end;
|
||||||
|
end if;
|
||||||
|
|
||||||
-- Case where a separate spec is present
|
-- If a sep[arate spec is present, then deal with freezing issues
|
||||||
|
|
||||||
elsif Present (Spec_Id) then
|
if Present (Spec_Id) then
|
||||||
Spec_Decl := Unit_Declaration_Node (Spec_Id);
|
Spec_Decl := Unit_Declaration_Node (Spec_Id);
|
||||||
Verify_Overriding_Indicator;
|
Verify_Overriding_Indicator;
|
||||||
|
|
||||||
|
@ -1960,15 +1963,6 @@ package body Sem_Ch6 is
|
||||||
Set_Has_Delayed_Freeze (Spec_Id);
|
Set_Has_Delayed_Freeze (Spec_Id);
|
||||||
Insert_Actions (N, Freeze_Entity (Spec_Id, Loc));
|
Insert_Actions (N, Freeze_Entity (Spec_Id, Loc));
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- The missing else branch here is for the case where there is no
|
|
||||||
-- separate spec and either we don't have a protected operation, or the
|
|
||||||
-- node is compiler generated. Is it really right that nothing needs to
|
|
||||||
-- be done in this case. At the very least a comment is appropriate as
|
|
||||||
-- to why nothing needs to be done in this case ???
|
|
||||||
|
|
||||||
else
|
|
||||||
null;
|
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- Mark presence of postcondition proc in current scope
|
-- Mark presence of postcondition proc in current scope
|
||||||
|
|
|
@ -449,8 +449,8 @@ package body Sem_Ch8 is
|
||||||
-- private with on E.
|
-- private with on E.
|
||||||
|
|
||||||
procedure Find_Expanded_Name (N : Node_Id);
|
procedure Find_Expanded_Name (N : Node_Id);
|
||||||
-- Selected component is known to be expanded name. Verify legality
|
-- Selected component is known to be expanded name. Verify legality of
|
||||||
-- of selector given the scope denoted by prefix.
|
-- selector given the scope denoted by prefix.
|
||||||
|
|
||||||
function Find_Renamed_Entity
|
function Find_Renamed_Entity
|
||||||
(N : Node_Id;
|
(N : Node_Id;
|
||||||
|
|
Loading…
Reference in New Issue