Commit fd8b4053 by Hristian Kirtchev Committed by Arnaud Charlet

sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Depends is now a delayed aspect.

2013-04-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
	Depends is now a delayed aspect. The delay is required
	due to the interplay between aspects Depends and Global.
	(Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
	* sem_prag.adb: Reformat various error messages.
	(Add_Item): New subsidiary routine.
	(Analyze_Pragma): Add new variables
	Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
	analysis of pragma Depends now has the capability to check
	the proper mode and usage of subprogram inputs and outputs.
	(Appears_In): New routine.
	(Check_Function_Return): New routine.
	(Check_Mode): New routine.
	(Check_Usage): New routine.
	(Collect_Subprogram_Inputs_Outputs): New routine.

From-SVN: r197900
parent c2658843
2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect
Depends is now a delayed aspect. The delay is required
due to the interplay between aspects Depends and Global.
(Check_Aspect_At_Freeze_Point): Add an entry for aspect Depends.
* sem_prag.adb: Reformat various error messages.
(Add_Item): New subsidiary routine.
(Analyze_Pragma): Add new variables
Global_Seen, Result_Seen, Subp_Inputs and Subp_Outputs. The
analysis of pragma Depends now has the capability to check
the proper mode and usage of subprogram inputs and outputs.
(Appears_In): New routine.
(Check_Function_Return): New routine.
(Check_Mode): New routine.
(Check_Usage): New routine.
(Collect_Subprogram_Inputs_Outputs): New routine.
2013-04-12 Bob Duff <duff@adacore.com>
* par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
......
......@@ -1475,6 +1475,9 @@ package body Sem_Ch13 is
Delay_Required := False;
-- Aspect Depends must be delayed because it mentions names
-- of inputs and output that are classified by aspect Global.
when Aspect_Depends =>
Aitem :=
Make_Pragma (Loc,
......@@ -1484,8 +1487,6 @@ package body Sem_Ch13 is
Make_Pragma_Argument_Association (Loc,
Expression => Relocate_Node (Expr))));
Delay_Required := False;
-- Aspect Global must be delayed because it can mention names
-- and benefit from the forward visibility rules applicable to
-- aspects of subprograms.
......@@ -7194,6 +7195,14 @@ package body Sem_Ch13 is
when Aspect_Default_Value =>
T := Entity (ASN);
-- Depends is a delayed aspect because it mentiones names first
-- introduced by aspect Global which is already delayed. There is
-- no action to be taken with respect to the aspect itself as the
-- analysis is done by the corresponding pragma.
when Aspect_Depends =>
return;
when Aspect_Dispatching_Domain =>
T := RTE (RE_Dispatching_Domain);
......@@ -7205,8 +7214,8 @@ package body Sem_Ch13 is
-- Global is a delayed aspect because it may reference names that
-- have not been declared yet. There is no action to be taken with
-- respect to the aspect itself as the reference checking is done on
-- the corresponding pragma.
-- respect to the aspect itself as the reference checking is done
-- on the corresponding pragma.
when Aspect_Global =>
return;
......@@ -7283,7 +7292,6 @@ package body Sem_Ch13 is
when Aspect_Abstract_State |
Aspect_Contract_Case |
Aspect_Contract_Cases |
Aspect_Depends |
Aspect_Dimension |
Aspect_Dimension_System |
Aspect_Implicit_Dereference |
......
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