aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-11 11:25:26 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-11 11:25:26 +0200
commit21a5b575cfbb5cb2395cbd0689c718fa76f7c686 (patch)
tree46d21e8ecd9d60ce42e83f3b64e35a1ce9fee130 /gcc/ada/lib-xref.adb
parent0791fbe9c5fc4a6a5608b9dcc5d8055da33bc6fa (diff)
downloadgcc-21a5b575cfbb5cb2395cbd0689c718fa76f7c686.zip
gcc-21a5b575cfbb5cb2395cbd0689c718fa76f7c686.tar.gz
gcc-21a5b575cfbb5cb2395cbd0689c718fa76f7c686.tar.bz2
[multiple changes]
2010-10-11 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Output_References): Common handling for objects and formals of an anonymous access type. 2010-10-11 Eric Botcazou <ebotcazou@adacore.com> * make.adb (Scan_Make_Arg): Also pass -O to both compiler and linker. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb: Fix check for illegal equality declaration in Ada2012 2010-10-11 Gary Dismukes <dismukes@adacore.com> * sem_disp.adb (Check_Dispatching_Operation): When testing for issuing a warning about subprograms of a tagged type not being dispatching, limit this to cases where the tagged type and the subprogram are declared within the same declaration list. 2010-10-11 Jerome Lambourg <lambourg@adacore.com> * projects.texi, prj-attr.adb: Add new attribute documentation_dir. From-SVN: r165284
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb30
1 files changed, 14 insertions, 16 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 8fc8108..d87daec 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1809,27 +1809,25 @@ package body Lib.Xref is
Ctyp := '*';
end if;
- -- Special handling for access parameter
+ -- Special handling for access parameters and objects of
+ -- an anonymous access type.
- declare
- K : constant Entity_Kind := Ekind (Etype (XE.Ent));
-
- begin
- if (K = E_Anonymous_Access_Type
- or else
- K = E_Anonymous_Access_Subprogram_Type
- or else K =
- E_Anonymous_Access_Protected_Subprogram_Type)
- and then Is_Formal (XE.Ent)
+ if Ekind_In (Etype (XE.Ent),
+ E_Anonymous_Access_Type,
+ E_Anonymous_Access_Subprogram_Type,
+ E_Anonymous_Access_Protected_Subprogram_Type)
+ then
+ if Is_Formal (XE.Ent)
+ or else Ekind_In (XE.Ent, E_Variable, E_Constant)
then
Ctyp := 'p';
+ end if;
- -- Special handling for Boolean
+ -- Special handling for Boolean
- elsif Ctyp = 'e' and then Is_Boolean_Type (Ent) then
- Ctyp := 'b';
- end if;
- end;
+ elsif Ctyp = 'e' and then Is_Boolean_Type (Ent) then
+ Ctyp := 'b';
+ end if;
end if;
-- Special handling for abstract types and operations