aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/atree.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 18:01:19 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 18:01:19 +0100
commitf1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7 (patch)
treea0ba866ce4e9b2ddf5a2203f29d444ceede22713 /gcc/ada/atree.ads
parent47752af2e8442f1141f1025e58f9dcb76cdd7422 (diff)
downloadgcc-f1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7.zip
gcc-f1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7.tar.gz
gcc-f1a3590ee2fbbd4b4c7ccd43867cc37b07c1f4c7.tar.bz2
[multiple changes]
2014-02-24 Thomas Quinot <quinot@adacore.com> * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image. * s-oscons-tmplt.c: On VxWorks, include adaint.h only after vxWorks.h has been included. Also ensure that file attributes related definitions are output even in cases where socket support is not enabled. * a-tags.adb: Code clean up. * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote instead of -I to add the main ada source directory to the header search path, in order to avoid conflict between our own "types.h" and VxWork's <types.h>. 2014-02-24 Robert Dewar <dewar@adacore.com> * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter. * debug.adb: Remove documentation of -gnatd.X, no longer used. * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated. 2014-02-24 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Improve documentation of gnatpp. From-SVN: r208083
Diffstat (limited to 'gcc/ada/atree.ads')
-rw-r--r--gcc/ada/atree.ads31
1 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
index ba11082..1a36957 100644
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -494,7 +494,9 @@ package Atree is
-- is thus still attached to the tree. It is valid for Source to be Empty,
-- in which case Relocate_Node simply returns Empty as the result.
- function Copy_Separate_Tree (Source : Node_Id) return Node_Id;
+ function Copy_Separate_Tree
+ (Source : Node_Id;
+ Syntax_Only : Boolean := False) return Node_Id;
-- Given a node that is the root of a subtree, Copy_Separate_Tree copies
-- the entire syntactic subtree, including recursively any descendants
-- whose parent field references a copied node (descendants not linked to
@@ -505,6 +507,33 @@ package Atree is
-- is called on an unanalyzed tree, and no semantic information is copied.
-- However, to ensure that no entities are shared between the two when the
-- source is already analyzed, entity fields in the copy are zeroed out.
+ --
+ -- In addition, if Syntax_Only is set True, then when Copy_Separate_Tree
+ -- is applied Identical to Copy_Separate_Tree except that in the case of
+ -- applying it to an already analyzed tree, all Etype fields are reset,
+ -- and all Analyzed flags are set False. In addition, Expanded_Name
+ -- nodes are converted back into the original parser form (where they are
+ -- Selected_Components), so that renalysis does the right thing.
+ --
+ -- Note: it really seems like Copy_Separate_Tree could do these identical
+ -- steps unconditionally, and that nearly works, except for this one known
+ -- test case that fails:
+ --
+ -- 1. procedure III is
+ -- 2. procedure Proc2 is
+ -- 3. pragma Inline_Always (Proc2);
+ -- |
+ -- >>> argument of "INLINE_ALWAYS" must be entity in
+ -- current scope
+ --
+ -- 4. begin
+ -- 5. null;
+ -- 6. end Proc2;
+ -- 7. begin
+ -- 8. null;
+ -- 9. end III;
+ --
+ -- To be investigated ???
function Copy_Separate_List (Source : List_Id) return List_Id;
-- Applies Copy_Separate_Tree to each element of the Source list, returning