From: Arnaud Charlet Date: Mon, 11 Oct 2010 09:58:30 +0000 (+0200) Subject: [multiple changes] X-Git-Tag: upstream/12.2.0~89506 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddc1515a6469f08f9b528a6aeb2827683eb1a469;p=platform%2Fupstream%2Fgcc.git [multiple changes] 2010-10-11 Robert Dewar * sem_attr.adb: Minor reformatting. 2010-10-11 Javier Miranda * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading package System.Aux_Dec in VM platforms. 2010-10-11 Arnaud Charlet * sem_prag.adb (Process_Suppress_Unsuppress): Ignore Suppress/Unsuppress pragmas in codepeer mode. (Analyze_Pragma [Pragma_Suppress_All]): Do not generate error message in codepeer mode. * einfo.ads: Fix typo. From-SVN: r165290 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 803047c..7e347b9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,20 @@ +2010-10-11 Robert Dewar + + * sem_attr.adb: Minor reformatting. + +2010-10-11 Javier Miranda + + * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading + package System.Aux_Dec in VM platforms. + +2010-10-11 Arnaud Charlet + + * sem_prag.adb (Process_Suppress_Unsuppress): Ignore + Suppress/Unsuppress pragmas in codepeer mode. + (Analyze_Pragma [Pragma_Suppress_All]): Do not generate error message in + codepeer mode. + * einfo.ads: Fix typo. + 2010-10-11 Emmanuel Briot * sinfo.adb: Use GNAT.HTable rather than System.HTable. diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index a1034cf..40c0c81 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -2040,7 +2040,7 @@ package Einfo is -- Is_Discrete_Type (synthesized) -- Applies to all entities, true for all discrete types and subtypes --- Is_Discrete__Or_Fixed_Point_Type (synthesized) +-- Is_Discrete_Or_Fixed_Point_Type (synthesized) -- Applies to all entities, true for all discrete types and subtypes -- and all fixed-point types and subtypes. diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index b07f390..bfddc14 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4456,12 +4456,15 @@ package body Sem_Attr is when Attribute_Type_Key => Check_E0; Check_Type; + + -- This processing belongs in Eval_Attribute ??? + declare function Type_Key return String_Id; - -- A very preliminary implementation. - -- For now, a signature consists of only the type name. - -- This is clearly incomplete (e.g., adding a new field to - -- a record type should change the type's Type_Key attribute). + -- A very preliminary implementation. For now, a signature + -- consists of only the type name. This is clearly incomplete + -- (e.g., adding a new field to a record type should change the + -- type's Type_Key attribute). -------------- -- Type_Key -- @@ -4470,6 +4473,7 @@ package body Sem_Attr is function Type_Key return String_Id is Full_Name : constant String_Id := Fully_Qualified_Name_String (Entity (P)); + begin -- Copy all characters in Full_Name but the trailing NUL @@ -4477,6 +4481,7 @@ package body Sem_Attr is for J in 1 .. String_Length (Full_Name) - 1 loop Store_String_Char (Get_String_Char (Full_Name, Int (J))); end loop; + Store_String_Chars ("'Type_Key"); return End_String; end Type_Key; diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index c1c3d93..8404e95 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -64,6 +64,7 @@ with Sinfo.CN; use Sinfo.CN; with Snames; use Snames; with Style; use Style; with Table; +with Targparm; use Targparm; with Tbuild; use Tbuild; with Uintp; use Uintp; @@ -2933,7 +2934,11 @@ package body Sem_Ch8 is -- type is still not frozen). We exclude from this processing generic -- formal subprograms found in instantiations and AST_Entry renamings. - if not Present (Corresponding_Formal_Spec (N)) + -- We must exclude VM targets because entity AST_Handler is defined in + -- package System.Aux_Dec which is not available in those platforms. + + if VM_Target = No_VM + and then not Present (Corresponding_Formal_Spec (N)) and then Etype (Nam) /= RTE (RE_AST_Handler) then declare diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index ee613c7..5a845f4 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -4689,6 +4689,13 @@ package body Sem_Prag is -- Start of processing for Process_Suppress_Unsuppress begin + -- Ignore pragma Suppress/Unsuppress in codepeer mode: we want to + -- generate checks for analysis purposes, as set by -gnatC. + + if CodePeer_Mode then + return; + end if; + -- Suppress/Unsuppress can appear as a configuration pragma, or in a -- declarative part or a package spec (RM 11.5(5)). @@ -11995,8 +12002,10 @@ package body Sem_Prag is or else not Is_List_Member (N) or else List_Containing (N) /= Pragmas_After (Parent (N)) then - Error_Pragma - ("misplaced pragma%, must follow compilation unit"); + if not CodePeer_Mode then + Error_Pragma + ("misplaced pragma%, must follow compilation unit"); + end if; end if; -------------------------