diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-20 09:37:30 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-20 09:37:30 +0000 |
commit | 9429b6e934d31424545c97da2568452a83ef85f3 (patch) | |
tree | 067b6fb3d3db09d6874a82087fceda2ef195ae17 /gcc/ada/sem_elim.ads | |
parent | ce3dae590ae3e05156168a1cfab2b98a2286e848 (diff) | |
download | gcc-9429b6e934d31424545c97da2568452a83ef85f3.tar.gz |
2009-04-20 Gary Dismukes <dismukes@adacore.com>
* sem_elim.ads (Check_For_Eliminated_Subprogram): New procedure for
checking for references to eliminated subprograms that should be
flagged.
(Eliminate_Error_Message): Update comment to say "references" rather
than "calls" (since attribute cases are handled here as well).
* sem_elim.adb (Check_For_Eliminated_Subprogram): New procedure for
checking for references to eliminated subprograms that should be
flagged. Add with and use of Sem and Sem_Util.
* sem_res.adb (Resolve_Call): Reject calls to eliminated subprograms.
Add with and use of Sem_Elim.
* sem_attr.adb (Analyze_Access_Attribute): Reject access attributes
applied to eliminated subprograms.
(Analyze_Attribute): Reject 'Address and 'Code_Address applied to
eliminated subprograms.
Add with and use of Sem_Elim.
* sem_disp.adb (Check_Dispatching_Call): Remove error check for calls
to eliminated subprograms, now handled during Resolve_Call.
Remove with and use of Sem_Elim.
* exp_disp.adb (Make_DT): Get Ultimate_Alias of primitive before
testing Is_Eliminated, for proper handling of primitive derived from
eliminated subprograms.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146385 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_elim.ads')
-rw-r--r-- | gcc/ada/sem_elim.ads | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ada/sem_elim.ads b/gcc/ada/sem_elim.ads index 53f0de0c9c0..9bb1596336d 100644 --- a/gcc/ada/sem_elim.ads +++ b/gcc/ada/sem_elim.ads @@ -52,9 +52,17 @@ package Sem_Elim is -- Checks if entity E is eliminated, and if so sets the Is_Eliminated -- flag on the given entity. + procedure Check_For_Eliminated_Subprogram (N : Node_Id; S : Entity_Id); + -- Check that the subprogram S (or its ultimate parent in the case of a + -- derived subprogram or renaming) has not been eliminated. An error will + -- be flagged if the subprogram has been eliminated, unless the node N + -- occurs within an eliminated subprogram or within a generic unit. The + -- error will be posted on N. + procedure Eliminate_Error_Msg (N : Node_Id; E : Entity_Id); - -- Called by the front-end and back-end on encountering a call to an - -- eliminated subprogram. N is the node for the call, and E is the - -- entity of the subprogram being eliminated. + -- Called by the front-end and back-end on encountering a reference to an + -- eliminated subprogram. N is the node for the reference (such as occurs + -- in a call or attribute), and E is the entity of the subprogram that has + -- been eliminated. end Sem_Elim; |