OSDN Git Service

2010-10-11 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Oct 2010 09:58:30 +0000 (09:58 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Oct 2010 09:58:30 +0000 (09:58 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165290 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/einfo.ads
gcc/ada/sem_attr.adb
gcc/ada/sem_ch8.adb
gcc/ada/sem_prag.adb

index 803047c..7e347b9 100644 (file)
@@ -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.
index a1034cf..40c0c81 100644 (file)
@@ -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.
 
index b07f390..bfddc14 100644 (file)
@@ -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;
index c1c3d93..8404e95 100644 (file)
@@ -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
index ee613c7..5a845f4 100644 (file)
@@ -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;
 
          -------------------------