diff options
author | Robert Dewar <dewar@adacore.com> | 2007-12-13 11:19:43 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-12-13 11:19:43 +0100 |
commit | 561b58498765f443cf6905b7ee246af5a1a0f626 (patch) | |
tree | 1eff0c4702214edde615103bf7be7c328fafe364 /gcc/ada/lib-xref.ads | |
parent | 0312b364242bc5d1f96d00d7228ede4a26730e0c (diff) | |
download | gcc-561b58498765f443cf6905b7ee246af5a1a0f626.zip gcc-561b58498765f443cf6905b7ee246af5a1a0f626.tar.gz gcc-561b58498765f443cf6905b7ee246af5a1a0f626.tar.bz2 |
sem_ch5.adb, [...]: Update handling of assigned value/unreferenced warnings
2007-12-06 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb, s-taskin.adb, a-ciorma.adb, a-coorma.adb, a-cohama.adb,
a-cihama.adb, g-awk.adb,
s-inmaop-posix.adb: Update handling of assigned value/unreferenced
warnings
* exp_smem.adb: Update handling of assigned value/unreferenced warnings
* sem.adb: Update handling of assigned value/unreferenced warnings
* a-exexpr-gcc.adb: Add a pragma warnings off for boolean return
* lib-xref.ads: Improve documentation for k xref type
* lib-xref.adb:
Update handling of assigned value/unreferenced warnings
(Generate_Reference): Warning for reference to entity for which a
pragma Unreferenced has been given should be unconditional.
If the entity is a discriminal, mark the original
discriminant as referenced.
* sem_warn.ads, sem_warn.adb
(Check_One_Unit): Test Renamed_In_Spec to control giving warning for
no entities referenced in package
(Check_One_Unit): Don't give message about no entities referenced in
a package if a pragma Unreferenced has appeared.
Handle new warning flag -gnatw.a/-gnatw.A
Update handling of assigned value/unreferenced warnings
* atree.h: Add flags up to Flag247
(Flag231): New macro.
From-SVN: r130815
Diffstat (limited to 'gcc/ada/lib-xref.ads')
-rw-r--r-- | gcc/ada/lib-xref.ads | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads index 1a96e81..4d23773 100644 --- a/gcc/ada/lib-xref.ads +++ b/gcc/ada/lib-xref.ads @@ -237,8 +237,33 @@ package Lib.Xref is -- source node that generates the implicit reference, and it is -- useful to record this one. - -- k is used to denote a reference to the parent unit, in the - -- cross-reference line for a child unit. + -- k is another non-standard reference type, used to record a + -- reference from a child unit to its parent. For various cross- + -- referencing tools, we need a pointer from the xref entries for + -- the child to the parent. This is the opposite way round from + -- normal xref entries, since the reference is *from* the child + -- unit *to* the parent unit, yet appears in the xref entries for + -- the child. Consider this example: + -- + -- package q is + -- end; + -- package q.r is + -- end q.r; + -- + -- The ali file for q-r.ads has these entries + -- + -- D q.ads + -- D q-r.ads + -- D system.ads + -- X 1 q.ads + -- 1K9*q 2e4 2|1r9 2r5 + -- X 2 q-r.ads + -- 1K11*r 1|1k9 2|2l7 2e8 + -- + -- Here the 2|1r9 entry appearing in the section for the parent + -- is the normal reference from the child to the parent. The 1k9 + -- entry in the section for the child duplicates this information + -- but appears in the child rather than the parent. -- l is used to identify the occurrence in the source of the -- name on an end line. This is just a syntactic reference @@ -568,11 +593,11 @@ package Lib.Xref is -- a renaming of a predefined operator. procedure Generate_Reference - (E : Entity_Id; - N : Node_Id; - Typ : Character := 'r'; - Set_Ref : Boolean := True; - Force : Boolean := False); + (E : Entity_Id; + N : Node_Id; + Typ : Character := 'r'; + Set_Ref : Boolean := True; + Force : Boolean := False); -- This procedure is called to record a reference. N is the location -- of the reference and E is the referenced entity. Typ is one of: -- |