diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 18:06:39 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 18:06:39 +0000 |
commit | f4373e488bde70f61580dbb561f9b71d6049b242 (patch) | |
tree | 842e7b40243cbf4961daacf08eb8c1a0ed6ca8a6 /gcc/ada/sem_ch12.ads | |
parent | 383c7a1dc931107e4c27b21149969845c0365a66 (diff) | |
download | gcc-f4373e488bde70f61580dbb561f9b71d6049b242.tar.gz |
2006-10-31 Ed Schonberg <schonberg@adacore.com>
Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.ads, sem_ch12.adb (Save_References): If node is an operator
that has been constant-folded, preserve information of original tree,
for ASIS uses.
(Analyze_Formal_Derived_Type): Set the limited present flag of the newly
generated private extension declaration if the formal derived type is
synchronized. Carry synchronized present over to the generated private
extension.
(Validate_Derived_Type_Instance): Ensure that the actual of a
synchronized formal derived type is a synchronized tagged type.
(Instantiate_Formal_Package): When creating the instantiation used to
validate the actual package of a formal declared without a box, check
whether the formal itself depends on a prior actual.
(Instantiate_Formal_Subprogram): Create new entities for the defining
identifiers of the formals in the renaming declaration, for ASIS use.
(Instantiate_Formal_Subprogram, Instantiate_Formal_Type): When creating
a renaming declaration or a subtype declaration for an actual in an
instance, capture location information of declaration in generic, for
ASIS use.
(Instantiate_Formal_Package): Add comments on needed additional tests.
AI-317 (partial parametrization) is fully implemented.
(Validate_Private_Type_Instance): Add check for actual which
must have preelaborable initialization
Use new // insertion for some continuation messages
(Analyze_Formal_Object_Declaration): Change usage of Expression to
Default_Expression. Add type retrieval when the declaration has an
access definition. Update premature usage of incomplete type check.
(Check_Access_Definition): New subsidiary routine. Check whether the
current compilation version is Ada 05 and the supplied node has an
access definition.
(Instantiate object): Alphabetize local variables. Handle the creation
of new renaming declarations with respect to the kind of definition
used - either an access definition or a subtype mark. Guard against
unnecessary error message in the context of anonymous access types after
they have been resolved. Add check for required null exclusion in a
formal object declaration.
(Switch_View): A private subtype of a non-private type needs to be
switched (the base type can have been switched without its private
dependents because of the last branch of Check_Private_View.
(Check_Private_View): Do not recompute Base_Type (T), instead use cached
value from BT.
(Instantiate_Type): Emit an error message whenever a class-wide type of
a tagged incomplete type is used as a generic actual.
(Find_Actual_Type): Extend routine to handle a component type in a child
unit that is imported from a formal package in a parent.
(Validate_Derived_Type_Instance): Check that analyzed formal and actual
agree on constrainedness, rather than checking against ultimate ancestor
(Instantiate_Subprogram_Body): Create a cross-reference link to the
generic body, for navigation purposes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118300 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch12.ads')
-rw-r--r-- | gcc/ada/sem_ch12.ads | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads index f9634bdff65..2c32536b0f5 100644 --- a/gcc/ada/sem_ch12.ads +++ b/gcc/ada/sem_ch12.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2006, 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- -- @@ -126,4 +126,18 @@ package Sem_Ch12 is procedure Initialize; -- Initializes internal data structures + procedure Check_Private_View (N : Node_Id); + -- Check whether the type of a generic entity has a different view between + -- the point of generic analysis and the point of instantiation. If the + -- view has changed, then at the point of instantiation we restore the + -- correct view to perform semantic analysis of the instance, and reset + -- the current view after instantiation. The processing is driven by the + -- current private status of the type of the node, and Has_Private_View, + -- a flag that is set at the point of generic compilation. If view and + -- flag are inconsistent then the type is updated appropriately. + -- + -- This subprogram is used in Check_Generic_Actuals and Copy_Generic_Node, + -- and is exported here for the purpose of front-end inlining (see Exp_Ch6. + -- Expand_Inlined_Call.Process_Formals). + end Sem_Ch12; |