aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2008-04-08 09:04:25 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-04-08 09:04:25 +0200
commitd5316f684c43291075518fd1a52e3a77db3ba6a7 (patch)
tree3ec192b801a5c733ebd358616086bbc99884ac4b /gcc
parent1aa9da5b1cd6d70bcb3d900e6d9ca470bf759e3d (diff)
downloadgcc-d5316f684c43291075518fd1a52e3a77db3ba6a7.zip
gcc-d5316f684c43291075518fd1a52e3a77db3ba6a7.tar.gz
gcc-d5316f684c43291075518fd1a52e3a77db3ba6a7.tar.bz2
Update comments.
From-SVN: r134073
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/itypes.ads30
1 files changed, 26 insertions, 4 deletions
diff --git a/gcc/ada/itypes.ads b/gcc/ada/itypes.ads
index d677bf9..0d70c1d 100644
--- a/gcc/ada/itypes.ads
+++ b/gcc/ada/itypes.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, 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- --
@@ -38,7 +38,8 @@ package Itypes is
-- Implicit types (Itypes) are types and subtypes created by the semantic
-- phase or the expander to reflect the underlying semantics. These could
-- be generated by building trees for corresponding declarations and then
- -- analyzing these trees, but there are three reasons for not doing this:
+ -- analyzing these trees, but there are three reasons for not doing this
+ -- in some cases:
-- 1. The declarations would require more tree nodes
@@ -81,6 +82,25 @@ package Itypes is
-- and for the array subtype. The associated node of each index subtype
-- is the corresponding range expression.
+ -- Notes on the use of the Parent field of an Itype
+
+ -- In some cases, we do create a declaration node for an itype, and in
+ -- such cases, the Parent field of the Itype points to this declaration
+ -- in the normal manner. This case can be detected by checking for a
+ -- non-empty Parent field referencing a declaration whose Defining_Entity
+ -- is the Itype in question.
+
+ -- In some other cases, where we don't generate such a declaration, as
+ -- described above, the Itype is attached to the tree implicitly by being
+ -- referenced elsewhere, e.g. as the Etype of some object. In this case
+ -- the Parent field may be Empty.
+
+ -- In other cases where we don't generate a declaration for the Itype,
+ -- the Itype may be attached to an arbitrary node in the tree, using
+ -- the Parent field. This Parent field may even reference a declaration
+ -- for a related different entity (hence the description of the tests
+ -- needed for the case where a declaration for the Itype is created).
+
------------------
-- Create_Itype --
------------------
@@ -115,8 +135,10 @@ package Itypes is
-- The Scope_Id parameter specifies the scope of the created type, and
-- is normally the Current_Scope as shown, but can be set otherwise.
--
- -- If Ekind is in Access_Subprogram_Type_Kind, Can_Use_Internal_Rep is set
- -- True, unless Always_Compatible_Rep_On_Target is True.
+ -- The size/align fields are initialized to unknown (Uint_0).
+ --
+ -- If Ekind is in Access_Subprogram_Kind, Can_Use_Internal_Rep is set True,
+ -- unless Always_Compatible_Rep_On_Target is True.
---------------------------------
-- Create_Null_Excluding_Itype --