OSDN Git Service

2010-10-08 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 2010 12:57:10 +0000 (12:57 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 2010 12:57:10 +0000 (12:57 +0000)
* sem_cat.adb (Check_Categorization_Dependencies): Remote types
packages can depend on preleborated packages.

2010-10-08  Robert Dewar  <dewar@adacore.com>

* sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Pragmas
Interrupt_Handler and Attach_Handler not allowed in generics.

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

gcc/ada/ChangeLog
gcc/ada/sem_cat.adb
gcc/ada/sem_prag.adb

index 2090134..b47253f 100644 (file)
@@ -1,5 +1,15 @@
 2010-10-08  Robert Dewar  <dewar@adacore.com>
 
+       * sem_cat.adb (Check_Categorization_Dependencies): Remote types
+       packages can depend on preleborated packages.
+
+2010-10-08  Robert Dewar  <dewar@adacore.com>
+
+       * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Pragmas
+       Interrupt_Handler and Attach_Handler not allowed in generics.
+
+2010-10-08  Robert Dewar  <dewar@adacore.com>
+
        * ali.adb: Set Allocator_In_Body if AB parameter present on M line
        * ali.ads (Allocator_In_Body): New flag
        * bcheck.adb (Check_Consistent_Restrictions): Handle case of main
index 1f4ed10..0bae96d 100644 (file)
@@ -206,6 +206,17 @@ package body Sem_Cat is
            and then In_Package_Body (Unit_Entity)
          then
             null;
+
+         --  Special case: Remote_Types can depend on Preelaborated per
+         --  Ada 2005 AI 0206.
+
+         elsif Unit_Category = Remote_Types
+           and then Is_Preelaborated (Depended_Entity)
+         then
+            null;
+
+         --  All other cases, we do have an error
+
          else
             Err := True;
          end if;
index 90424cd..edad7e3 100644 (file)
@@ -1305,6 +1305,10 @@ package body Sem_Prag is
             Error_Pragma_Arg
               ("argument for pragma% must be library level entity", Arg1);
          end if;
+
+         if Inside_A_Generic then
+            Error_Pragma ("pragma% cannot be used inside a generic");
+         end if;
       end Check_Interrupt_Or_Attach_Handler;
 
       -------------------------------------------