Commit 59e5fbe0 by Robert Dewar Committed by Arnaud Charlet

re PR ada/10671 (improve error message for named notation used in pragma)

2005-06-14  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	PR ada/10671

	* sem_prag.adb: Implement pragma Persistent_BSS
	Remove obsolete pragma Persistent_Data, Persistent_Object
	Set Ada_Version_Explicit, for implementation of AI-362
	Test Ada_Version_Explicit for Preelaborate_05 and Pure_05
	Add processing for pragma Pure_05 and Preelaborate_05
	Add processing for Assertion_Policy pragma
	Add pragma identifiers for Assert
	(Analyze_Pragma, case Assert): Check number of arguments
	(Process_Inline): Additional guard against an illegal program, where the
	argument of the pragma is undefined, and warnings on redundant
	constructs are enabled.
	(Analyze_Pragma, case Obsolescent): Allow an optional second argument
	Ada_05 to this pragma, specifying that the pragma is only active in
	Ada_05 mode.
	(Check_Arg_Order): New procedure
	Add appropriate calls to this procedure throughout
	Also throughout, check entity name before doing any other checks

	* snames.h snames.ads, snames.adb: Add pragma Persistent_BSS
	Remove obsolete pragma Persistent_Data, Persistent_Object
	Add entries for pragma Pure_05 and Preelaborate_05
	Add entries for Assertion_Policy pragma and associated names
	Add some names for pragma argument processing

	* tbuild.ads, tbuild.adb: (Make_Linker_Section_Pragma): New function

From-SVN: r101060
parent 6eaf4095
...@@ -169,6 +169,7 @@ package body Snames is ...@@ -169,6 +169,7 @@ package body Snames is
"ada_83#" & "ada_83#" &
"ada_95#" & "ada_95#" &
"ada_05#" & "ada_05#" &
"assertion_policy#" &
"c_pass_by_copy#" & "c_pass_by_copy#" &
"compile_time_warning#" & "compile_time_warning#" &
"component_alignment#" & "component_alignment#" &
...@@ -191,8 +192,7 @@ package body Snames is ...@@ -191,8 +192,7 @@ package body Snames is
"no_strict_aliasing#" & "no_strict_aliasing#" &
"normalize_scalars#" & "normalize_scalars#" &
"polling#" & "polling#" &
"persistent_data#" & "persistent_bss#" &
"persistent_object#" &
"profile#" & "profile#" &
"profile_warnings#" & "profile_warnings#" &
"propagate_exceptions#" & "propagate_exceptions#" &
...@@ -277,9 +277,11 @@ package body Snames is ...@@ -277,9 +277,11 @@ package body Snames is
"page#" & "page#" &
"passive#" & "passive#" &
"preelaborate#" & "preelaborate#" &
"preelaborate_05#" &
"priority#" & "priority#" &
"psect_object#" & "psect_object#" &
"pure#" & "pure#" &
"pure_05#" &
"pure_function#" & "pure_function#" &
"remote_call_interface#" & "remote_call_interface#" &
"remote_types#" & "remote_types#" &
...@@ -320,9 +322,12 @@ package body Snames is ...@@ -320,9 +322,12 @@ package body Snames is
"default#" & "default#" &
"dll#" & "dll#" &
"win32#" & "win32#" &
"alias#" &
"as_is#" & "as_is#" &
"attribute_name#" &
"body_file_name#" & "body_file_name#" &
"boolean_entry_barriers#" & "boolean_entry_barriers#" &
"check#" &
"casing#" & "casing#" &
"code#" & "code#" &
"component#" & "component#" &
...@@ -333,6 +338,7 @@ package body Snames is ...@@ -333,6 +338,7 @@ package body Snames is
"dot_replacement#" & "dot_replacement#" &
"dynamic#" & "dynamic#" &
"entity#" & "entity#" &
"entry_count#" &
"external_name#" & "external_name#" &
"first_optional_parameter#" & "first_optional_parameter#" &
"form#" & "form#" &
...@@ -341,6 +347,8 @@ package body Snames is ...@@ -341,6 +347,8 @@ package body Snames is
"gnat#" & "gnat#" &
"gpl#" & "gpl#" &
"ieee_float#" & "ieee_float#" &
"ignore#" &
"info#" &
"internal#" & "internal#" &
"link_name#" & "link_name#" &
"lowercase#" & "lowercase#" &
...@@ -348,6 +356,7 @@ package body Snames is ...@@ -348,6 +356,7 @@ package body Snames is
"max_entry_queue_length#" & "max_entry_queue_length#" &
"max_size#" & "max_size#" &
"mechanism#" & "mechanism#" &
"message#" &
"mixedcase#" & "mixedcase#" &
"modified_gpl#" & "modified_gpl#" &
"name#" & "name#" &
...@@ -373,6 +382,7 @@ package body Snames is ...@@ -373,6 +382,7 @@ package body Snames is
"semaphore#" & "semaphore#" &
"simple_barriers#" & "simple_barriers#" &
"spec_file_name#" & "spec_file_name#" &
"state#" &
"static#" & "static#" &
"stack_size#" & "stack_size#" &
"subunit_file_name#" & "subunit_file_name#" &
...@@ -390,6 +400,7 @@ package body Snames is ...@@ -390,6 +400,7 @@ package body Snames is
"user#" & "user#" &
"vax_float#" & "vax_float#" &
"vms#" & "vms#" &
"vtable_ptr#" &
"working_storage#" & "working_storage#" &
"abort_signal#" & "abort_signal#" &
"access#" & "access#" &
......
...@@ -256,6 +256,37 @@ package body Tbuild is ...@@ -256,6 +256,37 @@ package body Tbuild is
return Make_Integer_Literal (Loc, UI_From_Int (Intval)); return Make_Integer_Literal (Loc, UI_From_Int (Intval));
end Make_Integer_Literal; end Make_Integer_Literal;
--------------------------------
-- Make_Linker_Section_Pragma --
--------------------------------
function Make_Linker_Section_Pragma
(Ent : Entity_Id;
Loc : Source_Ptr;
Sec : String) return Node_Id
is
LS : Node_Id;
begin
LS :=
Make_Pragma
(Loc,
Name_Linker_Section,
New_List
(Make_Pragma_Argument_Association
(Sloc => Loc,
Expression => New_Occurrence_Of (Ent, Loc)),
Make_Pragma_Argument_Association
(Sloc => Loc,
Expression =>
Make_String_Literal
(Sloc => Loc,
Strval => Sec))));
Set_Has_Gigi_Rep_Item (Ent);
return LS;
end Make_Linker_Section_Pragma;
--------------------------------- ---------------------------------
-- Make_Raise_Constraint_Error -- -- Make_Raise_Constraint_Error --
--------------------------------- ---------------------------------
......
...@@ -118,6 +118,13 @@ package Tbuild is ...@@ -118,6 +118,13 @@ package Tbuild is
pragma Inline (Make_Integer_Literal); pragma Inline (Make_Integer_Literal);
-- A convenient form of Make_Integer_Literal taking Int instead of Uint -- A convenient form of Make_Integer_Literal taking Int instead of Uint
function Make_Linker_Section_Pragma
(Ent : Entity_Id;
Loc : Source_Ptr;
Sec : String) return Node_Id;
-- Construct a Linker_Section pragma for entity Ent, using string Sec as
-- the section name. Loc is the Sloc value to use in building the pragma.
function Make_Raise_Constraint_Error function Make_Raise_Constraint_Error
(Sloc : Source_Ptr; (Sloc : Source_Ptr;
Condition : Node_Id := Empty; Condition : Node_Id := Empty;
......
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