Commit 6f123e48 by Robert Dewar Committed by Arnaud Charlet

sem_cat.adb (Check_Categorization_Dependencies): Remote types packages can…

sem_cat.adb (Check_Categorization_Dependencies): Remote types packages can depend on preleborated packages.

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.

From-SVN: r165172
parent 87003b28
2010-10-08 Robert Dewar <dewar@adacore.com> 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.adb: Set Allocator_In_Body if AB parameter present on M line
* ali.ads (Allocator_In_Body): New flag * ali.ads (Allocator_In_Body): New flag
* bcheck.adb (Check_Consistent_Restrictions): Handle case of main * bcheck.adb (Check_Consistent_Restrictions): Handle case of main
......
...@@ -206,6 +206,17 @@ package body Sem_Cat is ...@@ -206,6 +206,17 @@ package body Sem_Cat is
and then In_Package_Body (Unit_Entity) and then In_Package_Body (Unit_Entity)
then then
null; 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 else
Err := True; Err := True;
end if; end if;
......
...@@ -1305,6 +1305,10 @@ package body Sem_Prag is ...@@ -1305,6 +1305,10 @@ package body Sem_Prag is
Error_Pragma_Arg Error_Pragma_Arg
("argument for pragma% must be library level entity", Arg1); ("argument for pragma% must be library level entity", Arg1);
end if; end if;
if Inside_A_Generic then
Error_Pragma ("pragma% cannot be used inside a generic");
end if;
end Check_Interrupt_Or_Attach_Handler; end Check_Interrupt_Or_Attach_Handler;
------------------------------------------- -------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment