diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-11 11:58:30 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-11 11:58:30 +0200 |
commit | ddc1515a6469f08f9b528a6aeb2827683eb1a469 (patch) | |
tree | 3f7472efa3bc1bcbf8d1a4c74c448cc9cddeaf8e /gcc | |
parent | 1aa234217483f238c07ff819178d4c64e68fa74e (diff) | |
download | gcc-ddc1515a6469f08f9b528a6aeb2827683eb1a469.zip gcc-ddc1515a6469f08f9b528a6aeb2827683eb1a469.tar.gz gcc-ddc1515a6469f08f9b528a6aeb2827683eb1a469.tar.bz2 |
[multiple changes]
2010-10-11 Robert Dewar <dewar@adacore.com>
* sem_attr.adb: Minor reformatting.
2010-10-11 Javier Miranda <miranda@adacore.com>
* sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
package System.Aux_Dec in VM platforms.
2010-10-11 Arnaud Charlet <charlet@adacore.com>
* 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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/ada/einfo.ads | 2 | ||||
-rw-r--r-- | gcc/ada/sem_attr.adb | 13 | ||||
-rw-r--r-- | gcc/ada/sem_ch8.adb | 7 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 13 |
5 files changed, 44 insertions, 8 deletions
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 <dewar@adacore.com> + + * sem_attr.adb: Minor reformatting. + +2010-10-11 Javier Miranda <miranda@adacore.com> + + * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading + package System.Aux_Dec in VM platforms. + +2010-10-11 Arnaud Charlet <charlet@adacore.com> + + * 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 <briot@adacore.com> * 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; ------------------------- |