summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-17 11:24:31 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-17 11:24:31 +0200
commit93bcda233f11648dbf583a9f0e50af387594d78a (patch)
tree3f29dc65f74494cef564daa36014a76c44be4d21 /gcc/ada/sem_ch6.adb
parentba4a2f78eeb327397844448956bcc7abd5729050 (diff)
downloadgcc-93bcda233f11648dbf583a9f0e50af387594d78a.tar.gz
[multiple changes]
2009-04-17 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Add documentation about No_Streams restriction * sem_attr.adb (Check_Stream_Attribute): Exclude implicit stream attributes when checking No_Streams restriction. 2009-04-17 Thomas Quinot <quinot@adacore.com> * rtsfind.ads (RE_Request_Destroy): New PolyORB s-parint entity. * exp_dist.adb (PolyORB_Support.Build_General_Calling_Stubs): Add missing calls to RE_Request_Destroy to deallocate request objects after use. 2009-04-17 Nicolas Setton <setton@adacore.com> * link.c: Fix support for passing a response file under Darwin. 2009-04-17 Emmanuel Briot <briot@adacore.com> * prj.adb (Free): new subprogram. 2009-04-17 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb: additional initialization on incomplete subtypes. * sem_ch6.adb (Process_Formals): if the subprogram is in the private part and one of the formals is an incomplete tagged type, attach to list of private dependends of the type for later validation. * sem_ch7.adb (Uninstall_Declarations): diagnose attempts to declare primitive operations of a Taft-amendmment type. * freeze.adb (Freeze_Entity): Remove tests on formals of an incomplete type. The check is performed on package exit, possibly after the subprogram is frozen. 2009-04-17 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Get_Directories): Get the object and exec directory before looking for source directories, but make sure that there are nil if they are not explicitely declared and there is explicitely no sources in the project. From-SVN: r146227
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 576f9cd45b8..2606940a69e 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -7703,10 +7703,22 @@ package body Sem_Ch6 is
(Is_Class_Wide_Type (Formal_Type)
and then Is_Incomplete_Type (Root_Type (Formal_Type)))
then
- -- Ada 2005 (AI-326): Tagged incomplete types allowed
+ -- Ada 2005 (AI-326): Tagged incomplete types allowed in
+ -- primitive operations, as long as their completion is
+ -- in the same declarative part. If in the private part
+ -- this means that the type cannot be a Taft-amendment type.
+ -- Check is done on package exit.
if Is_Tagged_Type (Formal_Type) then
- null;
+ if Ekind (Scope (Current_Scope)) = E_Package
+ and then In_Private_Part (Scope (Current_Scope))
+ and then not From_With_Type (Formal_Type)
+ and then not Is_Class_Wide_Type (Formal_Type)
+ then
+ Append_Elmt
+ (Current_Scope,
+ Private_Dependents (Base_Type (Formal_Type)));
+ end if;
-- Special handling of Value_Type for CIL case