aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-18 12:01:26 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-18 12:01:26 +0200
commitdaff5ab71e8de29f3b3bd91a9151401f6a8ea197 (patch)
tree2a171b963b83e699b1397ae128743d670dbf52ba /gcc/ada/sinfo.adb
parentc45e5332cc03dc81591dfc409fdc224e4e1643c0 (diff)
downloadgcc-daff5ab71e8de29f3b3bd91a9151401f6a8ea197.zip
gcc-daff5ab71e8de29f3b3bd91a9151401f6a8ea197.tar.gz
gcc-daff5ab71e8de29f3b3bd91a9151401f6a8ea197.tar.bz2
[multiple changes]
2014-07-18 Robert Dewar <dewar@adacore.com> * repinfo.ads: Add documentation on handling of back annotation for dynamic case. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute of full type declaration, denotes previous declaration for incomplete view of the type. * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View of declaration if one is present. (Replace_Type): When constructing the signature of an inherited operation, handle properly the case where the operation has a formal whose type is an incomplete view. * sem_util.adb (Collect_Primitive_Operations): Handle properly the case of an operation declared after an incomplete declaration for a type T and before the full declaration of T. 2014-07-18 Pascal Obry <obry@adacore.com> * i-cstrea.ads: Add documentation for set_wide_text_mode. From-SVN: r212802
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index d2a19e2..ec7a23f 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -1713,6 +1713,14 @@ package body Sinfo is
return Flag11 (N);
end Includes_Infinities;
+ function Incomplete_View
+ (N : Node_Id) return Node_Id is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Full_Type_Declaration);
+ return Node2 (N);
+ end Incomplete_View;
+
function Inherited_Discriminant
(N : Node_Id) return Boolean is
begin
@@ -4879,6 +4887,14 @@ package body Sinfo is
Set_Flag11 (N, Val);
end Set_Includes_Infinities;
+ procedure Set_Incomplete_View
+ (N : Node_Id; Val : Node_Id) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Full_Type_Declaration);
+ Set_Node2 (N, Val); -- semantic field, no Parent set
+ end Set_Incomplete_View;
+
procedure Set_Inherited_Discriminant
(N : Node_Id; Val : Boolean := True) is
begin