aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj-pp.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-10-16 15:52:44 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-16 15:52:44 +0200
commit1df7c326c72121e3f18743dadb6880a102b018ed (patch)
tree71f80c67a9c6665c660a3abe4f1a267625f0ea3c /gcc/ada/prj-pp.adb
parente1e307d94145e51d9a06448466fbb1a535c89a38 (diff)
downloadgcc-1df7c326c72121e3f18743dadb6880a102b018ed.zip
gcc-1df7c326c72121e3f18743dadb6880a102b018ed.tar.gz
gcc-1df7c326c72121e3f18743dadb6880a102b018ed.tar.bz2
[multiple changes]
2015-10-16 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb Add an entry for Constant_After_Elaboration in table Canonical_Aspect. * aspects.ads Add entries for Constant_After_Elaboration in tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and Implementation_Defined_Aspect. * par-prag.adb Pragma Constant_After_Elaboration does not require special processing by the parser. * sem_ch13.adb Add an entry for Constant_After_Elaboration in table Sig_Flags. (Analyze_Aspect_Specifications): Add processing for aspect Constant_After_Elaboration. (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration does not require special processing at freeze time. * sem_prag.adb (Analyze_Pragma): Add processing for pragma Constant_After_Elaboration. Use routine Find_Related_Context to retrieve the context of pragma Part_Of. (Duplication_Error): Update comment on usage. (Find_Related_Context): New routine. * sem_prag.ads Add an entry for Constant_After_Elaboration in table Aspect_Specifying_Pragma. (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage. * sem_util.adb (Add_Contract_Item): Add processing for pragma Constant_After_Elaboration. * sem_util.ads (Add_Contract_Item): Update the comment on usage. * snames.ads-tmpl Add new predefined name and aspect id for Constant_After_Elaboration. 2015-10-16 Vincent Celier <celier@adacore.com> * prj-pp.adb (Pretty_Print.Print): Correctly display extending packages, instead of making them renamed packages. From-SVN: r228911
Diffstat (limited to 'gcc/ada/prj-pp.adb')
-rw-r--r--gcc/ada/prj-pp.adb17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ada/prj-pp.adb b/gcc/ada/prj-pp.adb
index 9ccd935..2b05eaa 100644
--- a/gcc/ada/prj-pp.adb
+++ b/gcc/ada/prj-pp.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2015, 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- --
@@ -522,7 +522,13 @@ package body Prj.PP is
if Project_Of_Renamed_Package_Of (Node, In_Tree) /=
Empty_Node
then
- Write_String (" renames ", Indent);
+ if First_Declarative_Item_Of (Node, In_Tree) = Empty_Node
+ then
+ Write_String (" renames ", Indent);
+ else
+ Write_String (" extends ", Indent);
+ end if;
+
Output_Name
(Name_Of
(Project_Of_Renamed_Package_Of (Node, In_Tree),
@@ -530,6 +536,13 @@ package body Prj.PP is
Indent);
Write_String (".", Indent);
Output_Name (Name_Of (Node, In_Tree), Indent);
+ end if;
+
+ if Project_Of_Renamed_Package_Of (Node, In_Tree) /=
+ Empty_Node
+ and then
+ First_Declarative_Item_Of (Node, In_Tree) = Empty_Node
+ then
Write_String (";", Indent);
Write_End_Of_Line_Comment (Node);
Print (First_Comment_After_End (Node, In_Tree), Indent);