From 3a2879357a1cd6e028c2426c1d20ce33c2892ce1 Mon Sep 17 00:00:00 2001 From: charlet Date: Thu, 4 Aug 2011 13:38:05 +0000 Subject: 2011-08-04 Bob Duff * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we need to compare with Class_Wide_Type (T2), in order to get at the original class-wide type node. * sem_type.ads (Covers): Improve the comment. * einfo.ads (Class_Wide_Type): Improve the comment. * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of the type of the Deref. 2011-08-04 Yannick Moy * gnat_rm.texi: Document that Test_Case pragma can only appear on separate declarations. * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to check identifier of pragma argument. (Chain_TC): check that no other test case associated to the same entity share the same name. (Check_Test_Case): disallow test case inside subprogram body (Analyze_Pragma): correct call to check identifier and not argument * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new function gets name from test case pragma. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177385 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/sem_util.adb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc/ada/sem_util.adb') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 5974f9cd57d..b7e3f21ff76 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -4331,6 +4331,16 @@ package body Sem_Util is return Entity_Id (Get_Name_Table_Info (Id)); end Get_Name_Entity_Id; + ------------------------------------ + -- Get_Name_From_Test_Case_Pragma -- + ------------------------------------ + + function Get_Name_From_Test_Case_Pragma (N : Node_Id) return String_Id is + begin + return + Strval (Get_Pragma_Arg (First (Pragma_Argument_Associations (N)))); + end Get_Name_From_Test_Case_Pragma; + ------------------- -- Get_Pragma_Id -- ------------------- -- cgit v1.2.1