summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_warn.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-27 13:51:46 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-27 13:51:46 +0000
commit5f8d6158f60d721073f43359d9befb911d2602f9 (patch)
tree39117f1ef2342c7a6d902bdfdeaa859e5d1c2f8c /gcc/ada/sem_warn.ads
parentbbbed24bf9c9a16ebdacf3feece0ee2a8f697bb1 (diff)
downloadgcc-5f8d6158f60d721073f43359d9befb911d2602f9.tar.gz
2009-10-27 Robert Dewar <dewar@adacore.com>
* s-os_lib.ads, s-os_lib.adb, prj-err.adb, makeutl.adb: Minor reformatting. 2009-10-27 Ed Schonberg <schonberg@adacore.com> * sem.util.ads, sem_util.adb (Denotes_Same_Object, Denotes_Same_Prefix): New functions to detect overlap between actuals that are not by-copy in a call, when one of them is in-out. * sem_warn.ads, sem_warn.adb (Warn_On_Overlapping_Actuals): New procedure, called on a subprogram call to warn when an in-out actual that is not by-copy overlaps with another actual, thus leadind to potentially dangerous aliasing in the body of the called subprogram. Currently the warning is under control of the -gnatX switch. * sem_res.adb (resolve_call): call Warn_On_Overlapping_Actuals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153594 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_warn.ads')
-rw-r--r--gcc/ada/sem_warn.ads5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_warn.ads b/gcc/ada/sem_warn.ads
index 4ab97be7d67..57d565cd83f 100644
--- a/gcc/ada/sem_warn.ads
+++ b/gcc/ada/sem_warn.ads
@@ -210,6 +210,11 @@ package Sem_Warn is
-- as an out parameter. True if either Warn_On_Modified_Unread is set for
-- an only OUT parameter, or if Warn_On_All_Unread_Out_Parameters is set.
+ procedure Warn_On_Overlapping_Actuals (Subp : Entity_Id; N : Node_Id);
+ -- Called on a subprogram call. Checks whether an in-out actual that is
+ -- not by-copy may overlap with another actual, thus leadind to aliasing
+ -- in the body of the called subprogram.
+
procedure Warn_On_Suspicious_Index (Name : Entity_Id; X : Node_Id);
-- This is called after resolving an indexed component or a slice. Name
-- is the entity for the name of the indexed array, and X is the subscript