From a397db9637a45274b4acc4ebcba14ae3506d5b80 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 12 Jan 2004 12:45:26 +0100 Subject: [multiple changes] 2004-01-12 Laurent Pautet * 3vsocthi.adb, 3vsocthi.ads, 3wsocthi.adb, 3wsocthi.ads, 3zsocthi.adb, 3zsocthi.ads, g-socthi.adb, g-socthi.ads (Socket_Error_Message): Return C.Strings.chars_ptr instead of String. * g-socket.adb (Raise_Socket_Error): Use new Socket_Error_Message signature. 2004-01-12 Javier Miranda * cstand.adb, exp_aggr.adb, exp_ch3.adb, exp_ch9.adb, exp_dist.adb, exp_imgv.adb, exp_pakd.adb, exp_util.adb, par-ch3.adb, sem.adb, sem_ch3.adb, sem_dist.adb, sem_prag.adb, sem_res.adb, sem_util.adb, sinfo.adb, sinfo.ads, sprint.adb: Addition of Component_Definition node. 2004-01-12 Ed Falis * impunit.adb: Add GNAT.Secondary_Stack_Info as user-visible unit 2004-01-12 Thomas Quinot * link.c: Change default libgnat kind to STATIC for FreeBSD. 2004-01-12 Ed Schonberg * lib-xref.adb (Get_Type_Reference): If the type is the subtype entity generated to rename a generic actual, go to the actual itself, the subtype is not a user-visible entity. * sem_ch7.adb (Uninstall_Declarations): If an entity in the visible part is a private subtype, reset the visibility of its full view, if any, to be consistent. 2004-01-12 Robert Dewar * trans.c (Eliminate_Error_Msg): New procedure called to generate msg * usage.adb: Remove mention of obsolete -gnatwb switch Noticed during code reading 2004-01-12 Jerome Guitton * 1ssecsta.adb: Minor changes for -gnatwa warnings 2004-01-12 GNAT Script * Make-lang.in: Makefile automatically updated From-SVN: r75714 --- gcc/ada/lib-xref.adb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'gcc/ada/lib-xref.adb') diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index bc663a1..64ae4b7 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2003, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2004, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -604,9 +604,7 @@ package body Lib.Xref is exit; end if; - -- For a subtype, go to ancestor subtype. If it is a - -- subtype created for a generic actual, not clear yet - -- what is the right type to use ??? + -- For a subtype, go to ancestor subtype. else Tref := Ancestor_Subtype (Tref); @@ -651,6 +649,19 @@ package body Lib.Xref is if Sloc (Tref) = Standard_Location or else Comes_From_Source (Tref) then + -- If the reference is a subtype created for a generic + -- actual, go to actual directly, the inner subtype is + -- not user visible. + + if Nkind (Parent (Tref)) = N_Subtype_Declaration + and then not Comes_From_Source (Parent (Tref)) + and then + (Is_Wrapper_Package (Scope (Tref)) + or else Is_Generic_Instance (Scope (Tref))) + then + Tref := Base_Type (Tref); + end if; + return; end if; end loop; -- cgit v1.1