Commit 874a0341 by Robert Dewar Committed by Arnaud Charlet

par-prag.adb (Prag): Add dummy entry for pragma Compile_Time_Error

2007-04-06  Robert Dewar  <dewar@adacore.com>
	    Javier Miranda  <miranda@adacore.com>
	    Bob Duff  <duff@adacore.com>
	    Vincent Celier  <celier@adacore.com>

	* par-prag.adb (Prag): Add dummy entry for pragma Compile_Time_Error
	(Extensions_Allowed): No longer sets Ada_Version
	Entry for pragma Unreferenced_Objects

	* sem_prag.adb (Analyze_Pragma, case Priority): Force with of
	system.tasking if pragma priority used in a procedure
	(Analyze_Pragma, case Warning): Handle dot warning switches
	(Process_Compile_Time_Warning_Or_Error): New procedure
	(Analyze_Pragma): Add processing for Compile_Time_Error
	Add support for extra arguments External_Name and Link_Name.
	Remove code associated with pragmas CPP_Virtual and CPP_Vtable.
	(Process_Import_Or_Interface): Add support for the use of pragma Import
	with tagged types.
	(Extensions_Allowed): No longer affects Ada_Version
	(Analyze_Pragma): Split Is_Abstract flag into Is_Abstract_Subprogram and
	Is_Abstract_Type. Make sure these are called only when appropriate.
	Add processing for pragma Unreferenced_Objects

	* snames.h, snames.ads, snames.adb: Add entry for pragma
	Compile_Time_Error
	Add new standard name Minimum_Binder_Options for new gprmake
	Add new standard names for gprmake: Archive_Suffix,
	Library_Auto_Init_Supported, Library_Major_Minor_Id_Supported,
	Library_Support, Library_Version_Options,
	Shared_Library_Minimum_Options,
	Shared_Library_Prefix, Shared_Library_Suffix, Symbolic_Link_Supported.
	Change Name_Call to Name_uCall so that it cannot clash with a legal
	subprogram name.
	Add new standard names Mapping_Spec_Suffix and Mapping_Body_Suffix
	Append C_Plus_Plus to convention identifiers as synonym for CPP
	Add new standard names Stack and Builder_Switches
	Add new standard names: Compiler_Minimum_Options, Global_Config_File,
	Library_Builder, Local_Config_File, Objects_Path, Objects_Path_File,
	Run_Path_Option, Toolchain_Version.
	Entry for pragma Unreferenced_Objects

	* switch-c.adb (Scan_Front_End_Switches): Store correct -gnateD
	switches, without repetition of "eD". Make sure that last character of
	-gnatep= switch is not taken as -gnat switch character.
	Complete rewrite of circuit for handling saving compilation options
	Occasioned by need to support dot switchs for -gnatw, but cleans up
	things in general.
	-gnatX does not affect Ada_Version
	Include -gnatyA in -gnatg style switches

	* sem_warn.ads, sem_warn.adb (Output_Unreferenced_Messages): Exclude
	warnings on return objects.
	(Warn_On_Useless_Assignment): Exclude warnings on return objects
	(Set_Dot_Warning_Switch): New procedure
	(Check_References): Add missing case of test for
	Has_Pragma_Unreferenced_Objects
	(Output_Unreferenced_Messages): Implement effect of new pragma
	Unreferenced_Objects, remove special casing of limited controlled
	variables.

From-SVN: r123588
parent 6c929a2e
...@@ -376,14 +376,10 @@ begin ...@@ -376,14 +376,10 @@ begin
if Chars (Expression (Arg1)) = Name_On then if Chars (Expression (Arg1)) = Name_On then
Extensions_Allowed := True; Extensions_Allowed := True;
Ada_Version := Ada_Version_Type'Last;
else else
Extensions_Allowed := False; Extensions_Allowed := False;
Ada_Version := Ada_Version_Type'Min (Ada_Version, Ada_95);
end if; end if;
Ada_Version_Explicit := Ada_Version;
---------------- ----------------
-- List (2.8) -- -- List (2.8) --
---------------- ----------------
...@@ -1058,6 +1054,7 @@ begin ...@@ -1058,6 +1054,7 @@ begin
Pragma_Atomic | Pragma_Atomic |
Pragma_Atomic_Components | Pragma_Atomic_Components |
Pragma_Attach_Handler | Pragma_Attach_Handler |
Pragma_Compile_Time_Error |
Pragma_Compile_Time_Warning | Pragma_Compile_Time_Warning |
Pragma_Convention_Identifier | Pragma_Convention_Identifier |
Pragma_CPP_Class | Pragma_CPP_Class |
...@@ -1179,6 +1176,7 @@ begin ...@@ -1179,6 +1176,7 @@ begin
Pragma_Unimplemented_Unit | Pragma_Unimplemented_Unit |
Pragma_Universal_Data | Pragma_Universal_Data |
Pragma_Unreferenced | Pragma_Unreferenced |
Pragma_Unreferenced_Objects |
Pragma_Unreserve_All_Interrupts | Pragma_Unreserve_All_Interrupts |
Pragma_Unsuppress | Pragma_Unsuppress |
Pragma_Use_VADS_Size | Pragma_Use_VADS_Size |
......
...@@ -35,7 +35,6 @@ with Casing; use Casing; ...@@ -35,7 +35,6 @@ with Casing; use Casing;
with Csets; use Csets; with Csets; use Csets;
with Debug; use Debug; with Debug; use Debug;
with Einfo; use Einfo; with Einfo; use Einfo;
with Elists; use Elists;
with Errout; use Errout; with Errout; use Errout;
with Exp_Dist; use Exp_Dist; with Exp_Dist; use Exp_Dist;
with Hostparm; use Hostparm; with Hostparm; use Hostparm;
...@@ -54,7 +53,6 @@ with Sem; use Sem; ...@@ -54,7 +53,6 @@ with Sem; use Sem;
with Sem_Ch3; use Sem_Ch3; with Sem_Ch3; use Sem_Ch3;
with Sem_Ch8; use Sem_Ch8; with Sem_Ch8; use Sem_Ch8;
with Sem_Ch13; use Sem_Ch13; with Sem_Ch13; use Sem_Ch13;
with Sem_Disp; use Sem_Disp;
with Sem_Dist; use Sem_Dist; with Sem_Dist; use Sem_Dist;
with Sem_Elim; use Sem_Elim; with Sem_Elim; use Sem_Elim;
with Sem_Eval; use Sem_Eval; with Sem_Eval; use Sem_Eval;
...@@ -513,6 +511,9 @@ package body Sem_Prag is ...@@ -513,6 +511,9 @@ package body Sem_Prag is
-- Shared is an obsolete Ada 83 pragma, treated as being identical -- Shared is an obsolete Ada 83 pragma, treated as being identical
-- in effect to pragma Atomic. -- in effect to pragma Atomic.
procedure Process_Compile_Time_Warning_Or_Error;
-- Common processing for Compile_Time_Error and Compile_Time_Warning
procedure Process_Convention (C : out Convention_Id; E : out Entity_Id); procedure Process_Convention (C : out Convention_Id; E : out Entity_Id);
-- Common procesing for Convention, Interface, Import and Export. -- Common procesing for Convention, Interface, Import and Export.
-- Checks first two arguments of pragma, and sets the appropriate -- Checks first two arguments of pragma, and sets the appropriate
...@@ -1985,6 +1986,78 @@ package body Sem_Prag is ...@@ -1985,6 +1986,78 @@ package body Sem_Prag is
end if; end if;
end Process_Atomic_Shared_Volatile; end Process_Atomic_Shared_Volatile;
-------------------------------------------
-- Process_Compile_Time_Warning_Or_Error --
-------------------------------------------
procedure Process_Compile_Time_Warning_Or_Error is
Arg1x : constant Node_Id := Get_Pragma_Arg (Arg1);
begin
GNAT_Pragma;
Check_Arg_Count (2);
Check_No_Identifiers;
Check_Arg_Is_Static_Expression (Arg2, Standard_String);
Analyze_And_Resolve (Arg1x, Standard_Boolean);
if Compile_Time_Known_Value (Arg1x) then
if Is_True (Expr_Value (Get_Pragma_Arg (Arg1))) then
declare
Str : constant String_Id :=
Strval (Get_Pragma_Arg (Arg2));
Len : constant Int := String_Length (Str);
Cont : Boolean;
Ptr : Nat;
CC : Char_Code;
C : Character;
begin
Cont := False;
Ptr := 1;
-- Loop through segments of message separated by line
-- feeds. We output these segments as separate messages
-- with continuation marks for all but the first.
loop
Error_Msg_Strlen := 0;
-- Loop to copy characters from argument to error
-- message string buffer.
loop
exit when Ptr > Len;
CC := Get_String_Char (Str, Ptr);
Ptr := Ptr + 1;
-- Ignore wide chars ??? else store character
if In_Character_Range (CC) then
C := Get_Character (CC);
exit when C = ASCII.LF;
Error_Msg_Strlen := Error_Msg_Strlen + 1;
Error_Msg_String (Error_Msg_Strlen) := C;
end if;
end loop;
-- Here with one line ready to go
Error_Msg_Warn := Prag_Id = Pragma_Compile_Time_Warning;
if Cont = False then
Error_Msg_N ("<~", Arg1);
Cont := True;
else
Error_Msg_N ("\<~", Arg1);
end if;
exit when Ptr > Len;
end loop;
end;
end if;
end if;
end Process_Compile_Time_Warning_Or_Error;
------------------------ ------------------------
-- Process_Convention -- -- Process_Convention --
------------------------ ------------------------
...@@ -3175,6 +3248,19 @@ package body Sem_Prag is ...@@ -3175,6 +3248,19 @@ package body Sem_Prag is
Set_Is_Public (Def_Id); Set_Is_Public (Def_Id);
Process_Interface_Name (Def_Id, Arg3, Arg4); Process_Interface_Name (Def_Id, Arg3, Arg4);
-- Import a CPP class
elsif Is_Record_Type (Def_Id)
and then C = Convention_CPP
then
if not Is_Tagged_Type (Def_Id) then
Error_Msg_Sloc := Sloc (Def_Id);
Error_Pragma_Arg ("imported 'C'P'P type must be tagged", Arg2);
else
Set_Is_CPP_Class (Def_Id);
Set_Is_Limited_Record (Def_Id);
end if;
else else
Error_Pragma_Arg Error_Pragma_Arg
("second argument of pragma% must be object or subprogram", ("second argument of pragma% must be object or subprogram",
...@@ -5035,6 +5121,16 @@ package body Sem_Prag is ...@@ -5035,6 +5121,16 @@ package body Sem_Prag is
-- Processing for this pragma is shared with Psect_Object -- Processing for this pragma is shared with Psect_Object
------------------------
-- Compile_Time_Error --
------------------------
-- pragma Compile_Time_Error
-- (boolean_EXPRESSION, static_string_EXPRESSION);
when Pragma_Compile_Time_Error =>
Process_Compile_Time_Warning_Or_Error;
-------------------------- --------------------------
-- Compile_Time_Warning -- -- Compile_Time_Warning --
-------------------------- --------------------------
...@@ -5042,71 +5138,8 @@ package body Sem_Prag is ...@@ -5042,71 +5138,8 @@ package body Sem_Prag is
-- pragma Compile_Time_Warning -- pragma Compile_Time_Warning
-- (boolean_EXPRESSION, static_string_EXPRESSION); -- (boolean_EXPRESSION, static_string_EXPRESSION);
when Pragma_Compile_Time_Warning => Compile_Time_Warning : declare when Pragma_Compile_Time_Warning =>
Arg1x : constant Node_Id := Get_Pragma_Arg (Arg1); Process_Compile_Time_Warning_Or_Error;
begin
GNAT_Pragma;
Check_Arg_Count (2);
Check_No_Identifiers;
Check_Arg_Is_Static_Expression (Arg2, Standard_String);
Analyze_And_Resolve (Arg1x, Standard_Boolean);
if Compile_Time_Known_Value (Arg1x) then
if Is_True (Expr_Value (Get_Pragma_Arg (Arg1))) then
declare
Str : constant String_Id :=
Strval (Get_Pragma_Arg (Arg2));
Len : constant Int := String_Length (Str);
Cont : Boolean;
Ptr : Nat;
CC : Char_Code;
C : Character;
begin
Cont := False;
Ptr := 1;
-- Loop through segments of message separated by line
-- feeds. We output these segments as separate messages
-- with continuation marks for all but the first.
loop
Error_Msg_Strlen := 0;
-- Loop to copy characters from argument to error
-- message string buffer.
loop
exit when Ptr > Len;
CC := Get_String_Char (Str, Ptr);
Ptr := Ptr + 1;
-- Ignore wide chars ??? else store character
if In_Character_Range (CC) then
C := Get_Character (CC);
exit when C = ASCII.LF;
Error_Msg_Strlen := Error_Msg_Strlen + 1;
Error_Msg_String (Error_Msg_Strlen) := C;
end if;
end loop;
-- Here with one line ready to go
if Cont = False then
Error_Msg_N ("?~", Arg1);
Cont := True;
else
Error_Msg_N ("\?~", Arg1);
end if;
exit when Ptr > Len;
end loop;
end;
end if;
end if;
end Compile_Time_Warning;
----------------------------- -----------------------------
-- Complete_Representation -- -- Complete_Representation --
...@@ -5348,12 +5381,14 @@ package body Sem_Prag is ...@@ -5348,12 +5381,14 @@ package body Sem_Prag is
when Pragma_CPP_Class => CPP_Class : declare when Pragma_CPP_Class => CPP_Class : declare
Arg : Node_Id; Arg : Node_Id;
Typ : Entity_Id; Typ : Entity_Id;
Default_DTC : Entity_Id := Empty;
VTP_Type : constant Entity_Id := RTE (RE_Vtable_Ptr);
C : Entity_Id;
Tag_C : Entity_Id;
begin begin
if Warn_On_Obsolescent_Feature then
Error_Msg_N
("'G'N'A'T pragma cpp'_class is now obsolete; replace it" &
" by pragma import?", N);
end if;
GNAT_Pragma; GNAT_Pragma;
Check_Arg_Count (1); Check_Arg_Count (1);
Check_Optional_Identifier (Arg1, Name_Entity); Check_Optional_Identifier (Arg1, Name_Entity);
...@@ -5374,79 +5409,22 @@ package body Sem_Prag is ...@@ -5374,79 +5409,22 @@ package body Sem_Prag is
Typ := Entity (Arg); Typ := Entity (Arg);
if not Is_Record_Type (Typ) then
Error_Pragma_Arg ("pragma% applicable to a record, "
& "tagged record or record extension", Arg1);
end if;
Default_DTC := First_Component (Typ);
while Present (Default_DTC)
and then Etype (Default_DTC) /= VTP_Type
loop
Next_Component (Default_DTC);
end loop;
-- Case of non tagged type
if not Is_Tagged_Type (Typ) then if not Is_Tagged_Type (Typ) then
Set_Is_CPP_Class (Typ); Error_Pragma_Arg ("pragma% applicable to tagged types ", Arg1);
if Present (Default_DTC) then
Error_Pragma_Arg
("only tagged records can contain vtable pointers", Arg1);
end if; end if;
-- Case of tagged type with no user-defined vtable ptr. In this
-- case, because of our C++ ABI compatibility, the programmer
-- does not need to specify the tag component.
elsif Is_Tagged_Type (Typ)
and then No (Default_DTC)
then
Set_Is_CPP_Class (Typ);
Set_Is_Limited_Record (Typ);
-- Tagged type that has a vtable ptr
elsif Present (Default_DTC) then
Set_Is_CPP_Class (Typ); Set_Is_CPP_Class (Typ);
Set_Is_Limited_Record (Typ); Set_Is_Limited_Record (Typ);
Set_Is_Tag (Default_DTC); Set_Convention (Typ, Convention_CPP);
Set_DT_Entry_Count (Default_DTC, No_Uint);
-- Since a CPP type has no direct link to its associated tag
-- most tags checks cannot be performed
Set_Kill_Tag_Checks (Typ);
Set_Kill_Tag_Checks (Class_Wide_Type (Typ));
-- Get rid of the _tag component when there was one.
-- It is only useful for regular tagged types
if Expander_Active and then Typ = Root_Type (Typ) then
Tag_C := First_Tag_Component (Typ);
C := First_Entity (Typ);
if C = Tag_C then
Set_First_Entity (Typ, Next_Entity (Tag_C));
else
while Next_Entity (C) /= Tag_C loop
Next_Entity (C);
end loop;
Set_Next_Entity (C, Next_Entity (Tag_C));
end if;
end if;
end if;
end CPP_Class; end CPP_Class;
--------------------- ---------------------
-- CPP_Constructor -- -- CPP_Constructor --
--------------------- ---------------------
-- pragma CPP_Constructor ([Entity =>] LOCAL_NAME); -- pragma CPP_Constructor ([Entity =>] LOCAL_NAME
-- [, [External_Name =>] static_string_EXPRESSION ]
-- [, [Link_Name =>] static_string_EXPRESSION ]);
when Pragma_CPP_Constructor => CPP_Constructor : declare when Pragma_CPP_Constructor => CPP_Constructor : declare
Id : Entity_Id; Id : Entity_Id;
...@@ -5454,7 +5432,8 @@ package body Sem_Prag is ...@@ -5454,7 +5432,8 @@ package body Sem_Prag is
begin begin
GNAT_Pragma; GNAT_Pragma;
Check_Arg_Count (1); Check_At_Least_N_Arguments (1);
Check_At_Most_N_Arguments (3);
Check_Optional_Identifier (Arg1, Name_Entity); Check_Optional_Identifier (Arg1, Name_Entity);
Check_Arg_Is_Local_Name (Arg1); Check_Arg_Is_Local_Name (Arg1);
...@@ -5473,10 +5452,9 @@ package body Sem_Prag is ...@@ -5473,10 +5452,9 @@ package body Sem_Prag is
and then Is_Class_Wide_Type (Etype (Def_Id)) and then Is_Class_Wide_Type (Etype (Def_Id))
and then Is_CPP_Class (Etype (Etype (Def_Id))) and then Is_CPP_Class (Etype (Etype (Def_Id)))
then then
-- What the heck is this??? this pragma allows only 1 arg
if Arg_Count >= 2 then if Arg_Count >= 2 then
Check_At_Most_N_Arguments (3); Set_Imported (Def_Id);
Set_Is_Public (Def_Id);
Process_Interface_Name (Def_Id, Arg2, Arg3); Process_Interface_Name (Def_Id, Arg2, Arg3);
end if; end if;
...@@ -5499,119 +5477,12 @@ package body Sem_Prag is ...@@ -5499,119 +5477,12 @@ package body Sem_Prag is
-- CPP_Virtual -- -- CPP_Virtual --
----------------- -----------------
-- pragma CPP_Virtual
-- [Entity =>] LOCAL_NAME
-- [ [Vtable_Ptr =>] LOCAL_NAME,
-- [Position =>] static_integer_EXPRESSION]);
when Pragma_CPP_Virtual => CPP_Virtual : declare when Pragma_CPP_Virtual => CPP_Virtual : declare
Arg : Node_Id;
Typ : Entity_Id;
Subp : Entity_Id;
VTP_Type : constant Entity_Id := RTE (RE_Vtable_Ptr);
DTC : Entity_Id;
V : Uint;
begin begin
GNAT_Pragma; if Warn_On_Obsolescent_Feature then
Check_Arg_Order ((Name_Entity, Name_Vtable_Ptr, Name_Position)); Error_Msg_N
("'G'N'A'T pragma cpp'_virtual is now obsolete and has " &
if Arg_Count = 3 then "no effect?", N);
Check_Optional_Identifier (Arg2, Name_Vtable_Ptr);
-- We allow Entry_Count as well as Position for the third
-- parameter for back compatibility with versions of GNAT
-- before version 3.12. The documentation has always said
-- Position, but the code up to 3.12 said Entry_Count.
if Chars (Arg3) /= Name_Entry_Count then
Check_Optional_Identifier (Arg3, Name_Position);
end if;
else
Check_Arg_Count (1);
end if;
Check_Optional_Identifier (Arg1, Name_Entity);
Check_Arg_Is_Local_Name (Arg1);
-- First argument must be a subprogram name
Arg := Expression (Arg1);
Find_Program_Unit_Name (Arg);
if Etype (Arg) = Any_Type then
return;
else
Subp := Entity (Arg);
end if;
if not (Is_Subprogram (Subp)
and then Is_Dispatching_Operation (Subp))
then
Error_Pragma_Arg
("pragma% must reference a primitive operation", Arg1);
end if;
Typ := Find_Dispatching_Type (Subp);
-- If only one Argument defaults are :
-- . DTC_Entity is the default Vtable pointer
-- . DT_Position will be set at the freezing point
if Arg_Count = 1 then
Set_DTC_Entity (Subp, First_Tag_Component (Typ));
return;
end if;
-- Second argument is a component name of type Vtable_Ptr
Arg := Expression (Arg2);
if Nkind (Arg) /= N_Identifier then
Error_Msg_NE ("must be a& component name", Arg, Typ);
raise Pragma_Exit;
end if;
DTC := First_Component (Typ);
while Present (DTC) and then Chars (DTC) /= Chars (Arg) loop
Next_Component (DTC);
end loop;
-- Case of tagged type with no user-defined vtable ptr
if No (DTC) then
Error_Msg_NE ("must be a& component name", Arg, Typ);
raise Pragma_Exit;
elsif Etype (DTC) /= VTP_Type then
Wrong_Type (Arg, VTP_Type);
return;
end if;
-- Third argument is an integer (DT_Position)
Arg := Expression (Arg3);
Analyze_And_Resolve (Arg, Any_Integer);
if not Is_Static_Expression (Arg) then
Flag_Non_Static_Expr
("third argument of pragma CPP_Virtual must be static!",
Arg3);
raise Pragma_Exit;
else
V := Expr_Value (Expression (Arg3));
if V <= 0 then
Error_Pragma_Arg
("third argument of pragma% must be positive",
Arg3);
else
Set_DTC_Entity (Subp, DTC);
Set_DT_Position (Subp, V);
end if;
end if; end if;
end CPP_Virtual; end CPP_Virtual;
...@@ -5619,110 +5490,12 @@ package body Sem_Prag is ...@@ -5619,110 +5490,12 @@ package body Sem_Prag is
-- CPP_Vtable -- -- CPP_Vtable --
---------------- ----------------
-- pragma CPP_Vtable (
-- [Entity =>] LOCAL_NAME
-- [Vtable_Ptr =>] LOCAL_NAME,
-- [Entry_Count =>] static_integer_EXPRESSION);
when Pragma_CPP_Vtable => CPP_Vtable : declare when Pragma_CPP_Vtable => CPP_Vtable : declare
Arg : Node_Id;
Typ : Entity_Id;
VTP_Type : constant Entity_Id := RTE (RE_Vtable_Ptr);
DTC : Entity_Id;
V : Uint;
Elmt : Elmt_Id;
begin begin
GNAT_Pragma; if Warn_On_Obsolescent_Feature then
Check_Arg_Order ((Name_Entity, Name_Vtable_Ptr, Name_Entry_Count)); Error_Msg_N
Check_Arg_Count (3); ("'G'N'A'T pragma cpp'_vtable is now obsolete and has " &
Check_Optional_Identifier (Arg1, Name_Entity); "no effect?", N);
Check_Optional_Identifier (Arg2, Name_Vtable_Ptr);
Check_Optional_Identifier (Arg3, Name_Entry_Count);
Check_Arg_Is_Local_Name (Arg1);
-- First argument is a record type name
Arg := Expression (Arg1);
Analyze (Arg);
if Etype (Arg) = Any_Type then
return;
else
Typ := Entity (Arg);
end if;
if not (Is_Tagged_Type (Typ) and then Is_CPP_Class (Typ)) then
Error_Pragma_Arg ("'C'P'P_Class tagged type expected", Arg1);
end if;
-- Second argument is a component name of type Vtable_Ptr
Arg := Expression (Arg2);
if Nkind (Arg) /= N_Identifier then
Error_Msg_NE ("must be a& component name", Arg, Typ);
raise Pragma_Exit;
end if;
DTC := First_Component (Typ);
while Present (DTC) and then Chars (DTC) /= Chars (Arg) loop
Next_Component (DTC);
end loop;
if No (DTC) then
Error_Msg_NE ("must be a& component name", Arg, Typ);
raise Pragma_Exit;
elsif Etype (DTC) /= VTP_Type then
Wrong_Type (DTC, VTP_Type);
return;
-- If it is the first pragma Vtable, This becomes the default tag
elsif (not Is_Tag (DTC))
and then DT_Entry_Count (First_Tag_Component (Typ)) = No_Uint
then
Set_Is_Tag (First_Tag_Component (Typ), False);
Set_Is_Tag (DTC, True);
Set_DT_Entry_Count (DTC, No_Uint);
end if;
-- Those pragmas must appear before any primitive operation
-- definition (except inherited ones) otherwise the default
-- may be wrong
Elmt := First_Elmt (Primitive_Operations (Typ));
while Present (Elmt) loop
if No (Alias (Node (Elmt))) then
Error_Msg_Sloc := Sloc (Node (Elmt));
Error_Pragma
("pragma% must appear before this primitive operation");
end if;
Next_Elmt (Elmt);
end loop;
-- Third argument is an integer (DT_Entry_Count)
Arg := Expression (Arg3);
Analyze_And_Resolve (Arg, Any_Integer);
if not Is_Static_Expression (Arg) then
Flag_Non_Static_Expr
("entry count for pragma CPP_Vtable must be a static " &
"expression!", Arg3);
raise Pragma_Exit;
else
V := Expr_Value (Expression (Arg3));
if V <= 0 then
Error_Pragma_Arg
("entry count for pragma% must be positive", Arg3);
else
Set_DT_Entry_Count (DTC, V);
end if;
end if; end if;
end CPP_Vtable; end CPP_Vtable;
...@@ -6560,14 +6333,10 @@ package body Sem_Prag is ...@@ -6560,14 +6333,10 @@ package body Sem_Prag is
if Chars (Expression (Arg1)) = Name_On then if Chars (Expression (Arg1)) = Name_On then
Extensions_Allowed := True; Extensions_Allowed := True;
Ada_Version := Ada_Version_Type'Last;
else else
Extensions_Allowed := False; Extensions_Allowed := False;
Ada_Version := Ada_Version_Type'Min (Ada_Version, Ada_95);
end if; end if;
Ada_Version_Explicit := Ada_Version;
-------------- --------------
-- External -- -- External --
-------------- --------------
...@@ -7674,7 +7443,7 @@ package body Sem_Prag is ...@@ -7674,7 +7443,7 @@ package body Sem_Prag is
-- java.lang.Object.Typ and that all primitives of the type -- java.lang.Object.Typ and that all primitives of the type
-- should be declared abstract. ??? -- should be declared abstract. ???
if not Is_Tagged_Type (Typ) or else not Is_Abstract (Typ) then if not Is_Tagged_Type (Typ) or else not Is_Abstract_Type (Typ) then
Error_Pragma_Arg ("pragma% requires an abstract " Error_Pragma_Arg ("pragma% requires an abstract "
& "tagged type", Arg1); & "tagged type", Arg1);
...@@ -8929,6 +8698,18 @@ package body Sem_Prag is ...@@ -8929,6 +8698,18 @@ package body Sem_Prag is
Set_Main_Priority Set_Main_Priority
(Current_Sem_Unit, UI_To_Int (Expr_Value (Arg))); (Current_Sem_Unit, UI_To_Int (Expr_Value (Arg)));
-- Load an arbitrary entity from System.Tasking to make sure
-- this package is implicitly with'ed, since we need to have
-- the tasking run-time active for the pragma Priority to have
-- any effect.
declare
Discard : Entity_Id;
pragma Warnings (Off, Discard);
begin
Discard := RTE (RE_Task_List);
end;
-- Task or Protected, must be of type Integer -- Task or Protected, must be of type Integer
elsif Nkind (P) = N_Protected_Definition elsif Nkind (P) = N_Protected_Definition
...@@ -10586,7 +10367,7 @@ package body Sem_Prag is ...@@ -10586,7 +10367,7 @@ package body Sem_Prag is
Get_Name_String (Chars (Cunitent)); Get_Name_String (Chars (Cunitent));
Set_Casing (Mixed_Case); Set_Casing (Mixed_Case);
Write_Str (Name_Buffer (1 .. Name_Len)); Write_Str (Name_Buffer (1 .. Name_Len));
Write_Str (" is not implemented"); Write_Str (" is not supported in this configuration");
Write_Eol; Write_Eol;
raise Unrecoverable_Error; raise Unrecoverable_Error;
end if; end if;
...@@ -10709,6 +10490,38 @@ package body Sem_Prag is ...@@ -10709,6 +10490,38 @@ package body Sem_Prag is
end if; end if;
end Unreferenced; end Unreferenced;
--------------------------
-- Unreferenced_Objects --
--------------------------
-- pragma Unreferenced_Objects (local_Name {, local_Name});
when Pragma_Unreferenced_Objects => Unreferenced_Objects : declare
Arg_Node : Node_Id;
Arg_Expr : Node_Id;
begin
GNAT_Pragma;
Check_At_Least_N_Arguments (1);
Arg_Node := Arg1;
while Present (Arg_Node) loop
Check_No_Identifier (Arg_Node);
Check_Arg_Is_Local_Name (Arg_Node);
Arg_Expr := Get_Pragma_Arg (Arg_Node);
if not Is_Entity_Name (Arg_Expr)
or else not Is_Type (Entity (Arg_Expr))
then
Error_Pragma_Arg
("argument for pragma% must be type or subtype", Arg_Node);
end if;
Set_Has_Pragma_Unreferenced_Objects (Entity (Arg_Expr));
Next (Arg_Node);
end loop;
end Unreferenced_Objects;
------------------------------ ------------------------------
-- Unreserve_All_Interrupts -- -- Unreserve_All_Interrupts --
------------------------------ ------------------------------
...@@ -10862,20 +10675,48 @@ package body Sem_Prag is ...@@ -10862,20 +10675,48 @@ package body Sem_Prag is
declare declare
Lit : constant Node_Id := Expr_Value_S (Argx); Lit : constant Node_Id := Expr_Value_S (Argx);
Str : constant String_Id := Strval (Lit); Str : constant String_Id := Strval (Lit);
Len : constant Nat := String_Length (Str);
C : Char_Code; C : Char_Code;
J : Nat;
OK : Boolean;
Chr : Character;
begin begin
for J in 1 .. String_Length (Str) loop J := 1;
while J <= Len loop
C := Get_String_Char (Str, J); C := Get_String_Char (Str, J);
OK := In_Character_Range (C);
if OK then
Chr := Get_Character (C);
-- Dot case
if J < Len and then Chr = '.' then
J := J + 1;
C := Get_String_Char (Str, J);
Chr := Get_Character (C);
if not Set_Dot_Warning_Switch (Chr) then
Error_Pragma_Arg
("invalid warning switch character " &
'.' & Chr, Arg1);
end if;
-- Non-Dot case
if In_Character_Range (C)
and then Set_Warning_Switch (Get_Character (C))
then
null;
else else
OK := Set_Warning_Switch (Chr);
end if;
end if;
if not OK then
Error_Pragma_Arg Error_Pragma_Arg
("invalid warning switch character", Arg1); ("invalid warning switch character " & Chr,
Arg1);
end if; end if;
J := J + 1;
end loop; end loop;
end; end;
end if; end if;
...@@ -10953,7 +10794,7 @@ package body Sem_Prag is ...@@ -10953,7 +10794,7 @@ package body Sem_Prag is
if Is_Configuration_Pragma then if Is_Configuration_Pragma then
if Chars (Argx) = Name_On then if Chars (Argx) = Name_On then
Error_Pragma Error_Pragma
("pragma Warnings (Off, string) cannot be " & ("pragma Warnings (On, string) cannot be " &
"used as configuration pragma"); "used as configuration pragma");
else else
...@@ -11178,6 +11019,7 @@ package body Sem_Prag is ...@@ -11178,6 +11019,7 @@ package body Sem_Prag is
Pragma_C_Pass_By_Copy => 0, Pragma_C_Pass_By_Copy => 0,
Pragma_Comment => 0, Pragma_Comment => 0,
Pragma_Common_Object => -1, Pragma_Common_Object => -1,
Pragma_Compile_Time_Error => -1,
Pragma_Compile_Time_Warning => -1, Pragma_Compile_Time_Warning => -1,
Pragma_Complete_Representation => 0, Pragma_Complete_Representation => 0,
Pragma_Complex_Representation => 0, Pragma_Complex_Representation => 0,
...@@ -11302,6 +11144,7 @@ package body Sem_Prag is ...@@ -11302,6 +11144,7 @@ package body Sem_Prag is
Pragma_Unimplemented_Unit => -1, Pragma_Unimplemented_Unit => -1,
Pragma_Universal_Data => -1, Pragma_Universal_Data => -1,
Pragma_Unreferenced => -1, Pragma_Unreferenced => -1,
Pragma_Unreferenced_Objects => -1,
Pragma_Unreserve_All_Interrupts => -1, Pragma_Unreserve_All_Interrupts => -1,
Pragma_Unsuppress => 0, Pragma_Unsuppress => 0,
Pragma_Use_VADS_Size => -1, Pragma_Use_VADS_Size => -1,
......
...@@ -392,6 +392,7 @@ package body Sem_Warn is ...@@ -392,6 +392,7 @@ package body Sem_Warn is
-- or if it is a parameter, to the corresponding spec. -- or if it is a parameter, to the corresponding spec.
if Has_Pragma_Unreferenced (E1) if Has_Pragma_Unreferenced (E1)
or else Has_Pragma_Unreferenced_Objects (Etype (E1))
or else (Is_Formal (E1) or else (Is_Formal (E1)
and then Present (Spec_Entity (E1)) and then Present (Spec_Entity (E1))
and then and then
...@@ -1641,6 +1642,7 @@ package body Sem_Warn is ...@@ -1641,6 +1642,7 @@ package body Sem_Warn is
then then
if Warn_On_Modified_Unread if Warn_On_Modified_Unread
and then not Is_Imported (E) and then not Is_Imported (E)
and then not Is_Return_Object (E)
-- Suppress message for aliased or renamed variables, -- Suppress message for aliased or renamed variables,
-- since there may be other entities that read the -- since there may be other entities that read the
...@@ -1658,20 +1660,12 @@ package body Sem_Warn is ...@@ -1658,20 +1660,12 @@ package body Sem_Warn is
-- Normal case of neither assigned nor read -- Normal case of neither assigned nor read
else else
-- We suppress the message for limited controlled types, -- We suppress the message for types for which a valid
-- to catch the common design pattern (known as RAII, or -- pragma Unreferenced_Objects has been given, otherwise
-- Resource Acquisition Is Initialization) which uses -- we go ahead and give the message.
-- such types solely for their initialization and
-- finalization semantics.
if Is_Controlled (Etype (E)) if not Has_Pragma_Unreferenced_Objects (Etype (E)) then
and then Is_Limited_Type (Etype (E))
then
null;
-- Normal case where we want to give message
else
-- Distinguish renamed case in message -- Distinguish renamed case in message
if Present (Renamed_Object (E)) if Present (Renamed_Object (E))
...@@ -1740,6 +1734,26 @@ package body Sem_Warn is ...@@ -1740,6 +1734,26 @@ package body Sem_Warn is
end loop; end loop;
end Output_Unreferenced_Messages; end Output_Unreferenced_Messages;
----------------------------
-- Set_Dot_Warning_Switch --
----------------------------
function Set_Dot_Warning_Switch (C : Character) return Boolean is
begin
case C is
when 'x' =>
Warn_On_Non_Local_Exception := True;
when 'X' =>
Warn_On_Non_Local_Exception := False;
when others =>
return False;
end case;
return True;
end Set_Dot_Warning_Switch;
------------------------ ------------------------
-- Set_Warning_Switch -- -- Set_Warning_Switch --
------------------------ ------------------------
...@@ -1761,6 +1775,7 @@ package body Sem_Warn is ...@@ -1761,6 +1775,7 @@ package body Sem_Warn is
Warn_On_Export_Import := True; Warn_On_Export_Import := True;
Warn_On_Modified_Unread := True; Warn_On_Modified_Unread := True;
Warn_On_No_Value_Assigned := True; Warn_On_No_Value_Assigned := True;
Warn_On_Non_Local_Exception := True;
Warn_On_Obsolescent_Feature := True; Warn_On_Obsolescent_Feature := True;
Warn_On_Questionable_Missing_Parens := True; Warn_On_Questionable_Missing_Parens := True;
Warn_On_Redundant_Constructs := True; Warn_On_Redundant_Constructs := True;
...@@ -1784,8 +1799,9 @@ package body Sem_Warn is ...@@ -1784,8 +1799,9 @@ package body Sem_Warn is
Warn_On_Hiding := False; Warn_On_Hiding := False;
Warn_On_Modified_Unread := False; Warn_On_Modified_Unread := False;
Warn_On_No_Value_Assigned := False; Warn_On_No_Value_Assigned := False;
Warn_On_Non_Local_Exception := False;
Warn_On_Obsolescent_Feature := False; Warn_On_Obsolescent_Feature := False;
Warn_On_Questionable_Missing_Parens := True; Warn_On_Questionable_Missing_Parens := False;
Warn_On_Redundant_Constructs := False; Warn_On_Redundant_Constructs := False;
Warn_On_Unchecked_Conversion := False; Warn_On_Unchecked_Conversion := False;
Warn_On_Unrecognized_Pragma := False; Warn_On_Unrecognized_Pragma := False;
...@@ -2409,11 +2425,12 @@ package body Sem_Warn is ...@@ -2409,11 +2425,12 @@ package body Sem_Warn is
-- Start of processing for Warn_On_Useless_Assignment -- Start of processing for Warn_On_Useless_Assignment
begin begin
-- Check if this is a case we want to warn on, a variable with -- Check if this is a case we want to warn on, a variable with the
-- the last assignment field set, with warnings enabled, and -- last assignment field set, with warnings enabled, and which is
-- which is not imported or exported. -- not imported or exported.
if Ekind (Ent) = E_Variable if Ekind (Ent) = E_Variable
and then not Is_Return_Object (Ent)
and then Present (Last_Assignment (Ent)) and then Present (Last_Assignment (Ent))
and then not Warnings_Off (Ent) and then not Warnings_Off (Ent)
and then not Has_Pragma_Unreferenced (Ent) and then not Has_Pragma_Unreferenced (Ent)
......
...@@ -37,9 +37,16 @@ package Sem_Warn is ...@@ -37,9 +37,16 @@ package Sem_Warn is
-------------------- --------------------
function Set_Warning_Switch (C : Character) return Boolean; function Set_Warning_Switch (C : Character) return Boolean;
-- This function sets the warning switch or switches corresponding to -- This function sets the warning switch or switches corresponding to the
-- the given character. It is used for processing a -gnatw switch on the -- given character. It is used to process a -gnatw switch on the command
-- command line, or a string literal in pragma Warnings. -- line, or a character in a string literal in pragma Warnings. Returns
-- True for valid warning character C, False for invalid character.
function Set_Dot_Warning_Switch (C : Character) return Boolean;
-- This function sets the warning switch or switches corresponding to the
-- given character preceded by a dot. Used to process a -gnatw. switch on
-- the command line or .C in a string literal in pragma Warnings. Returns
-- True for valid warning character C, False for invalid character.
------------------------------------------ ------------------------------------------
-- Routines to Handle Unused References -- -- Routines to Handle Unused References --
......
...@@ -139,7 +139,7 @@ package body Snames is ...@@ -139,7 +139,7 @@ package body Snames is
"partition#" & "partition#" &
"partition_interface#" & "partition_interface#" &
"ras#" & "ras#" &
"call#" & "_call#" &
"rci_name#" & "rci_name#" &
"receiver#" & "receiver#" &
"result#" & "result#" &
...@@ -178,6 +178,7 @@ package body Snames is ...@@ -178,6 +178,7 @@ package body Snames is
"ada_2005#" & "ada_2005#" &
"assertion_policy#" & "assertion_policy#" &
"c_pass_by_copy#" & "c_pass_by_copy#" &
"compile_time_error#" &
"compile_time_warning#" & "compile_time_warning#" &
"component_alignment#" & "component_alignment#" &
"convention_identifier#" & "convention_identifier#" &
...@@ -317,6 +318,7 @@ package body Snames is ...@@ -317,6 +318,7 @@ package body Snames is
"unchecked_union#" & "unchecked_union#" &
"unimplemented_unit#" & "unimplemented_unit#" &
"unreferenced#" & "unreferenced#" &
"unreferenced_objects#" &
"unreserve_all_interrupts#" & "unreserve_all_interrupts#" &
"volatile#" & "volatile#" &
"volatile_components#" & "volatile_components#" &
...@@ -333,6 +335,7 @@ package body Snames is ...@@ -333,6 +335,7 @@ package body Snames is
"asm#" & "asm#" &
"assembly#" & "assembly#" &
"default#" & "default#" &
"c_plus_plus#" &
"dll#" & "dll#" &
"win32#" & "win32#" &
"as_is#" & "as_is#" &
...@@ -664,13 +667,16 @@ package body Snames is ...@@ -664,13 +667,16 @@ package body Snames is
"ada_roots#" & "ada_roots#" &
"archive_builder#" & "archive_builder#" &
"archive_indexer#" & "archive_indexer#" &
"archive_suffix#" &
"binder#" & "binder#" &
"binder_driver#" & "binder_driver#" &
"body_suffix#" & "body_suffix#" &
"builder#" & "builder#" &
"builder_switches#" &
"compiler#" & "compiler#" &
"compiler_driver#" & "compiler_driver#" &
"compiler_kind#" & "compiler_kind#" &
"compiler_minimum_options#" &
"compiler_pic_option#" & "compiler_pic_option#" &
"compute_dependency#" & "compute_dependency#" &
"config_body_file_name#" & "config_body_file_name#" &
...@@ -695,6 +701,7 @@ package body Snames is ...@@ -695,6 +701,7 @@ package body Snames is
"finder#" & "finder#" &
"global_compiler_switches#" & "global_compiler_switches#" &
"global_configuration_pragmas#" & "global_configuration_pragmas#" &
"global_config_file#" &
"gnatls#" & "gnatls#" &
"gnatstub#" & "gnatstub#" &
"implementation#" & "implementation#" &
...@@ -707,32 +714,47 @@ package body Snames is ...@@ -707,32 +714,47 @@ package body Snames is
"language_processing#" & "language_processing#" &
"languages#" & "languages#" &
"library_ali_dir#" & "library_ali_dir#" &
"library_dir#" &
"library_auto_init#" & "library_auto_init#" &
"library_auto_init_supported#" &
"library_builder#" &
"library_dir#" &
"library_gcc#" & "library_gcc#" &
"library_interface#" & "library_interface#" &
"library_kind#" & "library_kind#" &
"library_name#" & "library_name#" &
"library_major_minor_id_supported#" &
"library_options#" & "library_options#" &
"library_reference_symbol_file#" & "library_reference_symbol_file#" &
"library_src_dir#" & "library_src_dir#" &
"library_support#" &
"library_symbol_file#" & "library_symbol_file#" &
"library_symbol_policy#" & "library_symbol_policy#" &
"library_version#" & "library_version#" &
"library_version_options#" &
"linker#" & "linker#" &
"linker_executable_option#" & "linker_executable_option#" &
"linker_lib_dir_option#" & "linker_lib_dir_option#" &
"linker_lib_name_option#" & "linker_lib_name_option#" &
"local_config_file#" &
"local_configuration_pragmas#" & "local_configuration_pragmas#" &
"locally_removed_files#" & "locally_removed_files#" &
"mapping_file_switches#" & "mapping_file_switches#" &
"mapping_spec_suffix#" &
"mapping_body_suffix#" &
"metrics#" & "metrics#" &
"minimum_binder_options#" &
"naming#" & "naming#" &
"objects_path#" &
"objects_path_file#" &
"object_dir#" & "object_dir#" &
"pretty_printer#" & "pretty_printer#" &
"project#" & "project#" &
"roots#" & "roots#" &
"run_path_option#" &
"runtime_project#" & "runtime_project#" &
"shared_library_minimum_options#" &
"shared_library_prefix#" &
"shared_library_suffix#" &
"separate_suffix#" & "separate_suffix#" &
"source_dirs#" & "source_dirs#" &
"source_files#" & "source_files#" &
...@@ -742,7 +764,10 @@ package body Snames is ...@@ -742,7 +764,10 @@ package body Snames is
"specification#" & "specification#" &
"specification_exceptions#" & "specification_exceptions#" &
"specification_suffix#" & "specification_suffix#" &
"stack#" &
"switches#" & "switches#" &
"symbolic_link_supported#" &
"toolchain_version#" &
"unaligned_valid#" & "unaligned_valid#" &
"interface#" & "interface#" &
"overriding#" & "overriding#" &
...@@ -982,6 +1007,8 @@ package body Snames is ...@@ -982,6 +1007,8 @@ package body Snames is
Convention_Identifiers.Append ((Name_Default, Convention_C)); Convention_Identifiers.Append ((Name_Default, Convention_C));
Convention_Identifiers.Append ((Name_External, Convention_C)); Convention_Identifiers.Append ((Name_External, Convention_C));
Convention_Identifiers.Append ((Name_C_Plus_Plus, Convention_CPP));
Convention_Identifiers.Append ((Name_DLL, Convention_Stdcall)); Convention_Identifiers.Append ((Name_DLL, Convention_Stdcall));
Convention_Identifiers.Append ((Name_Win32, Convention_Stdcall)); Convention_Identifiers.Append ((Name_Win32, Convention_Stdcall));
end Initialize; end Initialize;
......
...@@ -267,7 +267,7 @@ package Snames is ...@@ -267,7 +267,7 @@ package Snames is
Name_Partition : constant Name_Id := N + 078; Name_Partition : constant Name_Id := N + 078;
Name_Partition_Interface : constant Name_Id := N + 079; Name_Partition_Interface : constant Name_Id := N + 079;
Name_Ras : constant Name_Id := N + 080; Name_Ras : constant Name_Id := N + 080;
Name_Call : constant Name_Id := N + 081; Name_uCall : constant Name_Id := N + 081;
Name_RCI_Name : constant Name_Id := N + 082; Name_RCI_Name : constant Name_Id := N + 082;
Name_Receiver : constant Name_Id := N + 083; Name_Receiver : constant Name_Id := N + 083;
Name_Result : constant Name_Id := N + 084; Name_Result : constant Name_Id := N + 084;
...@@ -339,58 +339,59 @@ package Snames is ...@@ -339,58 +339,59 @@ package Snames is
Name_Ada_2005 : constant Name_Id := N + 117; -- GNAT Name_Ada_2005 : constant Name_Id := N + 117; -- GNAT
Name_Assertion_Policy : constant Name_Id := N + 118; -- Ada 05 Name_Assertion_Policy : constant Name_Id := N + 118; -- Ada 05
Name_C_Pass_By_Copy : constant Name_Id := N + 119; -- GNAT Name_C_Pass_By_Copy : constant Name_Id := N + 119; -- GNAT
Name_Compile_Time_Warning : constant Name_Id := N + 120; -- GNAT Name_Compile_Time_Error : constant Name_Id := N + 120; -- GNAT
Name_Component_Alignment : constant Name_Id := N + 121; -- GNAT Name_Compile_Time_Warning : constant Name_Id := N + 121; -- GNAT
Name_Convention_Identifier : constant Name_Id := N + 122; -- GNAT Name_Component_Alignment : constant Name_Id := N + 122; -- GNAT
Name_Debug_Policy : constant Name_Id := N + 123; -- GNAT Name_Convention_Identifier : constant Name_Id := N + 123; -- GNAT
Name_Detect_Blocking : constant Name_Id := N + 124; -- Ada 05 Name_Debug_Policy : constant Name_Id := N + 124; -- GNAT
Name_Discard_Names : constant Name_Id := N + 125; Name_Detect_Blocking : constant Name_Id := N + 125; -- Ada 05
Name_Elaboration_Checks : constant Name_Id := N + 126; -- GNAT Name_Discard_Names : constant Name_Id := N + 126;
Name_Eliminate : constant Name_Id := N + 127; -- GNAT Name_Elaboration_Checks : constant Name_Id := N + 127; -- GNAT
Name_Explicit_Overriding : constant Name_Id := N + 128; -- Ada 05 Name_Eliminate : constant Name_Id := N + 128; -- GNAT
Name_Extend_System : constant Name_Id := N + 129; -- GNAT Name_Explicit_Overriding : constant Name_Id := N + 129; -- Ada 05
Name_Extensions_Allowed : constant Name_Id := N + 130; -- GNAT Name_Extend_System : constant Name_Id := N + 130; -- GNAT
Name_External_Name_Casing : constant Name_Id := N + 131; -- GNAT Name_Extensions_Allowed : constant Name_Id := N + 131; -- GNAT
Name_Float_Representation : constant Name_Id := N + 132; -- GNAT Name_External_Name_Casing : constant Name_Id := N + 132; -- GNAT
Name_Initialize_Scalars : constant Name_Id := N + 133; -- GNAT Name_Float_Representation : constant Name_Id := N + 133; -- GNAT
Name_Interrupt_State : constant Name_Id := N + 134; -- GNAT Name_Initialize_Scalars : constant Name_Id := N + 134; -- GNAT
Name_License : constant Name_Id := N + 135; -- GNAT Name_Interrupt_State : constant Name_Id := N + 135; -- GNAT
Name_Locking_Policy : constant Name_Id := N + 136; Name_License : constant Name_Id := N + 136; -- GNAT
Name_Long_Float : constant Name_Id := N + 137; -- VMS Name_Locking_Policy : constant Name_Id := N + 137;
Name_No_Run_Time : constant Name_Id := N + 138; -- GNAT Name_Long_Float : constant Name_Id := N + 138; -- VMS
Name_No_Strict_Aliasing : constant Name_Id := N + 139; -- GNAT Name_No_Run_Time : constant Name_Id := N + 139; -- GNAT
Name_Normalize_Scalars : constant Name_Id := N + 140; Name_No_Strict_Aliasing : constant Name_Id := N + 140; -- GNAT
Name_Polling : constant Name_Id := N + 141; -- GNAT Name_Normalize_Scalars : constant Name_Id := N + 141;
Name_Persistent_BSS : constant Name_Id := N + 142; -- GNAT Name_Polling : constant Name_Id := N + 142; -- GNAT
Name_Priority_Specific_Dispatching : constant Name_Id := N + 143; -- Ada 05 Name_Persistent_BSS : constant Name_Id := N + 143; -- GNAT
Name_Profile : constant Name_Id := N + 144; -- Ada 05 Name_Priority_Specific_Dispatching : constant Name_Id := N + 144; -- Ada 05
Name_Profile_Warnings : constant Name_Id := N + 145; -- GNAT Name_Profile : constant Name_Id := N + 145; -- Ada 05
Name_Propagate_Exceptions : constant Name_Id := N + 146; -- GNAT Name_Profile_Warnings : constant Name_Id := N + 146; -- GNAT
Name_Queuing_Policy : constant Name_Id := N + 147; Name_Propagate_Exceptions : constant Name_Id := N + 147; -- GNAT
Name_Ravenscar : constant Name_Id := N + 148; -- Ada 05 Name_Queuing_Policy : constant Name_Id := N + 148;
Name_Restricted_Run_Time : constant Name_Id := N + 149; -- GNAT Name_Ravenscar : constant Name_Id := N + 149; -- Ada 05
Name_Restrictions : constant Name_Id := N + 150; Name_Restricted_Run_Time : constant Name_Id := N + 150; -- GNAT
Name_Restriction_Warnings : constant Name_Id := N + 151; -- GNAT Name_Restrictions : constant Name_Id := N + 151;
Name_Reviewable : constant Name_Id := N + 152; Name_Restriction_Warnings : constant Name_Id := N + 152; -- GNAT
Name_Source_File_Name : constant Name_Id := N + 153; -- GNAT Name_Reviewable : constant Name_Id := N + 153;
Name_Source_File_Name_Project : constant Name_Id := N + 154; -- GNAT Name_Source_File_Name : constant Name_Id := N + 154; -- GNAT
Name_Style_Checks : constant Name_Id := N + 155; -- GNAT Name_Source_File_Name_Project : constant Name_Id := N + 155; -- GNAT
Name_Suppress : constant Name_Id := N + 156; Name_Style_Checks : constant Name_Id := N + 156; -- GNAT
Name_Suppress_Exception_Locations : constant Name_Id := N + 157; -- GNAT Name_Suppress : constant Name_Id := N + 157;
Name_Task_Dispatching_Policy : constant Name_Id := N + 158; Name_Suppress_Exception_Locations : constant Name_Id := N + 158; -- GNAT
Name_Universal_Data : constant Name_Id := N + 159; -- AAMP Name_Task_Dispatching_Policy : constant Name_Id := N + 159;
Name_Unsuppress : constant Name_Id := N + 160; -- GNAT Name_Universal_Data : constant Name_Id := N + 160; -- AAMP
Name_Use_VADS_Size : constant Name_Id := N + 161; -- GNAT Name_Unsuppress : constant Name_Id := N + 161; -- GNAT
Name_Validity_Checks : constant Name_Id := N + 162; -- GNAT Name_Use_VADS_Size : constant Name_Id := N + 162; -- GNAT
Name_Warnings : constant Name_Id := N + 163; -- GNAT Name_Validity_Checks : constant Name_Id := N + 163; -- GNAT
Name_Wide_Character_Encoding : constant Name_Id := N + 164; -- GNAT Name_Warnings : constant Name_Id := N + 164; -- GNAT
Last_Configuration_Pragma_Name : constant Name_Id := N + 164; Name_Wide_Character_Encoding : constant Name_Id := N + 165; -- GNAT
Last_Configuration_Pragma_Name : constant Name_Id := N + 165;
-- Remaining pragma names -- Remaining pragma names
Name_Abort_Defer : constant Name_Id := N + 165; -- GNAT Name_Abort_Defer : constant Name_Id := N + 166; -- GNAT
Name_All_Calls_Remote : constant Name_Id := N + 166; Name_All_Calls_Remote : constant Name_Id := N + 167;
Name_Annotate : constant Name_Id := N + 167; -- GNAT Name_Annotate : constant Name_Id := N + 168; -- GNAT
-- Note: AST_Entry is not in this list because its name matches the -- Note: AST_Entry is not in this list because its name matches the
-- name of the corresponding attribute. However, it is included in the -- name of the corresponding attribute. However, it is included in the
...@@ -398,72 +399,72 @@ package Snames is ...@@ -398,72 +399,72 @@ package Snames is
-- and Check_Pragma_Id correctly recognize and process Name_AST_Entry. -- and Check_Pragma_Id correctly recognize and process Name_AST_Entry.
-- AST_Entry is a VMS specific pragma. -- AST_Entry is a VMS specific pragma.
Name_Assert : constant Name_Id := N + 168; -- Ada 05 Name_Assert : constant Name_Id := N + 169; -- Ada 05
Name_Asynchronous : constant Name_Id := N + 169; Name_Asynchronous : constant Name_Id := N + 170;
Name_Atomic : constant Name_Id := N + 170; Name_Atomic : constant Name_Id := N + 171;
Name_Atomic_Components : constant Name_Id := N + 171; Name_Atomic_Components : constant Name_Id := N + 172;
Name_Attach_Handler : constant Name_Id := N + 172; Name_Attach_Handler : constant Name_Id := N + 173;
Name_Comment : constant Name_Id := N + 173; -- GNAT Name_Comment : constant Name_Id := N + 174; -- GNAT
Name_Common_Object : constant Name_Id := N + 174; -- GNAT Name_Common_Object : constant Name_Id := N + 175; -- GNAT
Name_Complete_Representation : constant Name_Id := N + 175; -- GNAT Name_Complete_Representation : constant Name_Id := N + 176; -- GNAT
Name_Complex_Representation : constant Name_Id := N + 176; -- GNAT Name_Complex_Representation : constant Name_Id := N + 177; -- GNAT
Name_Controlled : constant Name_Id := N + 177; Name_Controlled : constant Name_Id := N + 178;
Name_Convention : constant Name_Id := N + 178; Name_Convention : constant Name_Id := N + 179;
Name_CPP_Class : constant Name_Id := N + 179; -- GNAT Name_CPP_Class : constant Name_Id := N + 180; -- GNAT
Name_CPP_Constructor : constant Name_Id := N + 180; -- GNAT Name_CPP_Constructor : constant Name_Id := N + 181; -- GNAT
Name_CPP_Virtual : constant Name_Id := N + 181; -- GNAT Name_CPP_Virtual : constant Name_Id := N + 182; -- GNAT
Name_CPP_Vtable : constant Name_Id := N + 182; -- GNAT Name_CPP_Vtable : constant Name_Id := N + 183; -- GNAT
Name_Debug : constant Name_Id := N + 183; -- GNAT Name_Debug : constant Name_Id := N + 184; -- GNAT
Name_Elaborate : constant Name_Id := N + 184; -- Ada 83 Name_Elaborate : constant Name_Id := N + 185; -- Ada 83
Name_Elaborate_All : constant Name_Id := N + 185; Name_Elaborate_All : constant Name_Id := N + 186;
Name_Elaborate_Body : constant Name_Id := N + 186; Name_Elaborate_Body : constant Name_Id := N + 187;
Name_Export : constant Name_Id := N + 187; Name_Export : constant Name_Id := N + 188;
Name_Export_Exception : constant Name_Id := N + 188; -- VMS Name_Export_Exception : constant Name_Id := N + 189; -- VMS
Name_Export_Function : constant Name_Id := N + 189; -- GNAT Name_Export_Function : constant Name_Id := N + 190; -- GNAT
Name_Export_Object : constant Name_Id := N + 190; -- GNAT Name_Export_Object : constant Name_Id := N + 191; -- GNAT
Name_Export_Procedure : constant Name_Id := N + 191; -- GNAT Name_Export_Procedure : constant Name_Id := N + 192; -- GNAT
Name_Export_Value : constant Name_Id := N + 192; -- GNAT Name_Export_Value : constant Name_Id := N + 193; -- GNAT
Name_Export_Valued_Procedure : constant Name_Id := N + 193; -- GNAT Name_Export_Valued_Procedure : constant Name_Id := N + 194; -- GNAT
Name_External : constant Name_Id := N + 194; -- GNAT Name_External : constant Name_Id := N + 195; -- GNAT
Name_Finalize_Storage_Only : constant Name_Id := N + 195; -- GNAT Name_Finalize_Storage_Only : constant Name_Id := N + 196; -- GNAT
Name_Ident : constant Name_Id := N + 196; -- VMS Name_Ident : constant Name_Id := N + 197; -- VMS
Name_Import : constant Name_Id := N + 197; Name_Import : constant Name_Id := N + 198;
Name_Import_Exception : constant Name_Id := N + 198; -- VMS Name_Import_Exception : constant Name_Id := N + 199; -- VMS
Name_Import_Function : constant Name_Id := N + 199; -- GNAT Name_Import_Function : constant Name_Id := N + 200; -- GNAT
Name_Import_Object : constant Name_Id := N + 200; -- GNAT Name_Import_Object : constant Name_Id := N + 201; -- GNAT
Name_Import_Procedure : constant Name_Id := N + 201; -- GNAT Name_Import_Procedure : constant Name_Id := N + 202; -- GNAT
Name_Import_Valued_Procedure : constant Name_Id := N + 202; -- GNAT Name_Import_Valued_Procedure : constant Name_Id := N + 203; -- GNAT
Name_Inline : constant Name_Id := N + 203; Name_Inline : constant Name_Id := N + 204;
Name_Inline_Always : constant Name_Id := N + 204; -- GNAT Name_Inline_Always : constant Name_Id := N + 205; -- GNAT
Name_Inline_Generic : constant Name_Id := N + 205; -- GNAT Name_Inline_Generic : constant Name_Id := N + 206; -- GNAT
Name_Inspection_Point : constant Name_Id := N + 206; Name_Inspection_Point : constant Name_Id := N + 207;
Name_Interface_Name : constant Name_Id := N + 207; -- GNAT Name_Interface_Name : constant Name_Id := N + 208; -- GNAT
Name_Interrupt_Handler : constant Name_Id := N + 208; Name_Interrupt_Handler : constant Name_Id := N + 209;
Name_Interrupt_Priority : constant Name_Id := N + 209; Name_Interrupt_Priority : constant Name_Id := N + 210;
Name_Java_Constructor : constant Name_Id := N + 210; -- GNAT Name_Java_Constructor : constant Name_Id := N + 211; -- GNAT
Name_Java_Interface : constant Name_Id := N + 211; -- GNAT Name_Java_Interface : constant Name_Id := N + 212; -- GNAT
Name_Keep_Names : constant Name_Id := N + 212; -- GNAT Name_Keep_Names : constant Name_Id := N + 213; -- GNAT
Name_Link_With : constant Name_Id := N + 213; -- GNAT Name_Link_With : constant Name_Id := N + 214; -- GNAT
Name_Linker_Alias : constant Name_Id := N + 214; -- GNAT Name_Linker_Alias : constant Name_Id := N + 215; -- GNAT
Name_Linker_Constructor : constant Name_Id := N + 215; -- GNAT Name_Linker_Constructor : constant Name_Id := N + 216; -- GNAT
Name_Linker_Destructor : constant Name_Id := N + 216; -- GNAT Name_Linker_Destructor : constant Name_Id := N + 217; -- GNAT
Name_Linker_Options : constant Name_Id := N + 217; Name_Linker_Options : constant Name_Id := N + 218;
Name_Linker_Section : constant Name_Id := N + 218; -- GNAT Name_Linker_Section : constant Name_Id := N + 219; -- GNAT
Name_List : constant Name_Id := N + 219; Name_List : constant Name_Id := N + 220;
Name_Machine_Attribute : constant Name_Id := N + 220; -- GNAT Name_Machine_Attribute : constant Name_Id := N + 221; -- GNAT
Name_Main : constant Name_Id := N + 221; -- GNAT Name_Main : constant Name_Id := N + 222; -- GNAT
Name_Main_Storage : constant Name_Id := N + 222; -- GNAT Name_Main_Storage : constant Name_Id := N + 223; -- GNAT
Name_Memory_Size : constant Name_Id := N + 223; -- Ada 83 Name_Memory_Size : constant Name_Id := N + 224; -- Ada 83
Name_No_Return : constant Name_Id := N + 224; -- GNAT Name_No_Return : constant Name_Id := N + 225; -- GNAT
Name_Obsolescent : constant Name_Id := N + 225; -- GNAT Name_Obsolescent : constant Name_Id := N + 226; -- GNAT
Name_Optimize : constant Name_Id := N + 226; Name_Optimize : constant Name_Id := N + 227;
Name_Optional_Overriding : constant Name_Id := N + 227; -- Ada 05 Name_Optional_Overriding : constant Name_Id := N + 228; -- Ada 05
Name_Pack : constant Name_Id := N + 228; Name_Pack : constant Name_Id := N + 229;
Name_Page : constant Name_Id := N + 229; Name_Page : constant Name_Id := N + 230;
Name_Passive : constant Name_Id := N + 230; -- GNAT Name_Passive : constant Name_Id := N + 231; -- GNAT
Name_Preelaborable_Initialization : constant Name_Id := N + 231; -- Ada 05 Name_Preelaborable_Initialization : constant Name_Id := N + 232; -- Ada 05
Name_Preelaborate : constant Name_Id := N + 232; Name_Preelaborate : constant Name_Id := N + 233;
Name_Preelaborate_05 : constant Name_Id := N + 233; -- GNAT Name_Preelaborate_05 : constant Name_Id := N + 234; -- GNAT
-- Note: Priority is not in this list because its name matches the -- Note: Priority is not in this list because its name matches the
-- name of the corresponding attribute. However, it is included in the -- name of the corresponding attribute. However, it is included in the
...@@ -471,15 +472,15 @@ package Snames is ...@@ -471,15 +472,15 @@ package Snames is
-- and Check_Pragma_Id correctly recognize and process Priority. -- and Check_Pragma_Id correctly recognize and process Priority.
-- Priority is a standard Ada 95 pragma. -- Priority is a standard Ada 95 pragma.
Name_Psect_Object : constant Name_Id := N + 234; -- VMS Name_Psect_Object : constant Name_Id := N + 235; -- VMS
Name_Pure : constant Name_Id := N + 235; Name_Pure : constant Name_Id := N + 236;
Name_Pure_05 : constant Name_Id := N + 236; -- GNAT Name_Pure_05 : constant Name_Id := N + 237; -- GNAT
Name_Pure_Function : constant Name_Id := N + 237; -- GNAT Name_Pure_Function : constant Name_Id := N + 238; -- GNAT
Name_Remote_Call_Interface : constant Name_Id := N + 238; Name_Remote_Call_Interface : constant Name_Id := N + 239;
Name_Remote_Types : constant Name_Id := N + 239; Name_Remote_Types : constant Name_Id := N + 240;
Name_Share_Generic : constant Name_Id := N + 240; -- GNAT Name_Share_Generic : constant Name_Id := N + 241; -- GNAT
Name_Shared : constant Name_Id := N + 241; -- Ada 83 Name_Shared : constant Name_Id := N + 242; -- Ada 83
Name_Shared_Passive : constant Name_Id := N + 242; Name_Shared_Passive : constant Name_Id := N + 243;
-- Note: Storage_Size is not in this list because its name matches the -- Note: Storage_Size is not in this list because its name matches the
-- name of the corresponding attribute. However, it is included in the -- name of the corresponding attribute. However, it is included in the
...@@ -489,27 +490,28 @@ package Snames is ...@@ -489,27 +490,28 @@ package Snames is
-- Note: Storage_Unit is also omitted from the list because of a clash -- Note: Storage_Unit is also omitted from the list because of a clash
-- with an attribute name, and is treated similarly. -- with an attribute name, and is treated similarly.
Name_Source_Reference : constant Name_Id := N + 243; -- GNAT Name_Source_Reference : constant Name_Id := N + 244; -- GNAT
Name_Stream_Convert : constant Name_Id := N + 244; -- GNAT Name_Stream_Convert : constant Name_Id := N + 245; -- GNAT
Name_Subtitle : constant Name_Id := N + 245; -- GNAT Name_Subtitle : constant Name_Id := N + 246; -- GNAT
Name_Suppress_All : constant Name_Id := N + 246; -- GNAT Name_Suppress_All : constant Name_Id := N + 247; -- GNAT
Name_Suppress_Debug_Info : constant Name_Id := N + 247; -- GNAT Name_Suppress_Debug_Info : constant Name_Id := N + 248; -- GNAT
Name_Suppress_Initialization : constant Name_Id := N + 248; -- GNAT Name_Suppress_Initialization : constant Name_Id := N + 249; -- GNAT
Name_System_Name : constant Name_Id := N + 249; -- Ada 83 Name_System_Name : constant Name_Id := N + 250; -- Ada 83
Name_Task_Info : constant Name_Id := N + 250; -- GNAT Name_Task_Info : constant Name_Id := N + 251; -- GNAT
Name_Task_Name : constant Name_Id := N + 251; -- GNAT Name_Task_Name : constant Name_Id := N + 252; -- GNAT
Name_Task_Storage : constant Name_Id := N + 252; -- VMS Name_Task_Storage : constant Name_Id := N + 253; -- VMS
Name_Thread_Body : constant Name_Id := N + 253; -- GNAT Name_Thread_Body : constant Name_Id := N + 254; -- GNAT
Name_Time_Slice : constant Name_Id := N + 254; -- GNAT Name_Time_Slice : constant Name_Id := N + 255; -- GNAT
Name_Title : constant Name_Id := N + 255; -- GNAT Name_Title : constant Name_Id := N + 256; -- GNAT
Name_Unchecked_Union : constant Name_Id := N + 256; -- GNAT Name_Unchecked_Union : constant Name_Id := N + 257; -- GNAT
Name_Unimplemented_Unit : constant Name_Id := N + 257; -- GNAT Name_Unimplemented_Unit : constant Name_Id := N + 258; -- GNAT
Name_Unreferenced : constant Name_Id := N + 258; -- GNAT Name_Unreferenced : constant Name_Id := N + 259; -- GNAT
Name_Unreserve_All_Interrupts : constant Name_Id := N + 259; -- GNAT Name_Unreferenced_Objects : constant Name_Id := N + 260; -- GNAT
Name_Volatile : constant Name_Id := N + 260; Name_Unreserve_All_Interrupts : constant Name_Id := N + 261; -- GNAT
Name_Volatile_Components : constant Name_Id := N + 261; Name_Volatile : constant Name_Id := N + 262;
Name_Weak_External : constant Name_Id := N + 262; -- GNAT Name_Volatile_Components : constant Name_Id := N + 263;
Last_Pragma_Name : constant Name_Id := N + 262; Name_Weak_External : constant Name_Id := N + 264; -- GNAT
Last_Pragma_Name : constant Name_Id := N + 264;
-- Language convention names for pragma Convention/Export/Import/Interface -- Language convention names for pragma Convention/Export/Import/Interface
-- Note that Name_C is not included in this list, since it was already -- Note that Name_C is not included in this list, since it was already
...@@ -520,114 +522,118 @@ package Snames is ...@@ -520,114 +522,118 @@ package Snames is
-- Entry and Protected, this is because these conventions cannot be -- Entry and Protected, this is because these conventions cannot be
-- specified by a pragma. -- specified by a pragma.
First_Convention_Name : constant Name_Id := N + 263; First_Convention_Name : constant Name_Id := N + 265;
Name_Ada : constant Name_Id := N + 263; Name_Ada : constant Name_Id := N + 265;
Name_Assembler : constant Name_Id := N + 264; Name_Assembler : constant Name_Id := N + 266;
Name_COBOL : constant Name_Id := N + 265; Name_COBOL : constant Name_Id := N + 267;
Name_CPP : constant Name_Id := N + 266; Name_CPP : constant Name_Id := N + 268;
Name_Fortran : constant Name_Id := N + 267; Name_Fortran : constant Name_Id := N + 269;
Name_Intrinsic : constant Name_Id := N + 268; Name_Intrinsic : constant Name_Id := N + 270;
Name_Java : constant Name_Id := N + 269; Name_Java : constant Name_Id := N + 271;
Name_Stdcall : constant Name_Id := N + 270; Name_Stdcall : constant Name_Id := N + 272;
Name_Stubbed : constant Name_Id := N + 271; Name_Stubbed : constant Name_Id := N + 273;
Last_Convention_Name : constant Name_Id := N + 271; Last_Convention_Name : constant Name_Id := N + 273;
-- The following names are preset as synonyms for Assembler -- The following names are preset as synonyms for Assembler
Name_Asm : constant Name_Id := N + 272; Name_Asm : constant Name_Id := N + 274;
Name_Assembly : constant Name_Id := N + 273; Name_Assembly : constant Name_Id := N + 275;
-- The following names are preset as synonyms for C -- The following names are preset as synonyms for C
Name_Default : constant Name_Id := N + 274; Name_Default : constant Name_Id := N + 276;
-- Name_Exernal (previously defined as pragma) -- Name_Exernal (previously defined as pragma)
-- The following names are preset as synonyms for CPP
Name_C_Plus_Plus : constant Name_Id := N + 277;
-- The following names are present as synonyms for Stdcall -- The following names are present as synonyms for Stdcall
Name_DLL : constant Name_Id := N + 275; Name_DLL : constant Name_Id := N + 278;
Name_Win32 : constant Name_Id := N + 276; Name_Win32 : constant Name_Id := N + 279;
-- Other special names used in processing pragmas -- Other special names used in processing pragmas
Name_As_Is : constant Name_Id := N + 277; Name_As_Is : constant Name_Id := N + 280;
Name_Attribute_Name : constant Name_Id := N + 278; Name_Attribute_Name : constant Name_Id := N + 281;
Name_Body_File_Name : constant Name_Id := N + 279; Name_Body_File_Name : constant Name_Id := N + 282;
Name_Boolean_Entry_Barriers : constant Name_Id := N + 280; Name_Boolean_Entry_Barriers : constant Name_Id := N + 283;
Name_Check : constant Name_Id := N + 281; Name_Check : constant Name_Id := N + 284;
Name_Casing : constant Name_Id := N + 282; Name_Casing : constant Name_Id := N + 285;
Name_Code : constant Name_Id := N + 283; Name_Code : constant Name_Id := N + 286;
Name_Component : constant Name_Id := N + 284; Name_Component : constant Name_Id := N + 287;
Name_Component_Size_4 : constant Name_Id := N + 285; Name_Component_Size_4 : constant Name_Id := N + 288;
Name_Copy : constant Name_Id := N + 286; Name_Copy : constant Name_Id := N + 289;
Name_D_Float : constant Name_Id := N + 287; Name_D_Float : constant Name_Id := N + 290;
Name_Descriptor : constant Name_Id := N + 288; Name_Descriptor : constant Name_Id := N + 291;
Name_Dot_Replacement : constant Name_Id := N + 289; Name_Dot_Replacement : constant Name_Id := N + 292;
Name_Dynamic : constant Name_Id := N + 290; Name_Dynamic : constant Name_Id := N + 293;
Name_Entity : constant Name_Id := N + 291; Name_Entity : constant Name_Id := N + 294;
Name_Entry_Count : constant Name_Id := N + 292; Name_Entry_Count : constant Name_Id := N + 295;
Name_External_Name : constant Name_Id := N + 293; Name_External_Name : constant Name_Id := N + 296;
Name_First_Optional_Parameter : constant Name_Id := N + 294; Name_First_Optional_Parameter : constant Name_Id := N + 297;
Name_Form : constant Name_Id := N + 295; Name_Form : constant Name_Id := N + 298;
Name_G_Float : constant Name_Id := N + 296; Name_G_Float : constant Name_Id := N + 299;
Name_Gcc : constant Name_Id := N + 297; Name_Gcc : constant Name_Id := N + 300;
Name_Gnat : constant Name_Id := N + 298; Name_Gnat : constant Name_Id := N + 301;
Name_GPL : constant Name_Id := N + 299; Name_GPL : constant Name_Id := N + 302;
Name_IEEE_Float : constant Name_Id := N + 300; Name_IEEE_Float : constant Name_Id := N + 303;
Name_Ignore : constant Name_Id := N + 301; Name_Ignore : constant Name_Id := N + 304;
Name_Info : constant Name_Id := N + 302; Name_Info : constant Name_Id := N + 305;
Name_Internal : constant Name_Id := N + 303; Name_Internal : constant Name_Id := N + 306;
Name_Link_Name : constant Name_Id := N + 304; Name_Link_Name : constant Name_Id := N + 307;
Name_Lowercase : constant Name_Id := N + 305; Name_Lowercase : constant Name_Id := N + 308;
Name_Max_Entry_Queue_Depth : constant Name_Id := N + 306; Name_Max_Entry_Queue_Depth : constant Name_Id := N + 309;
Name_Max_Entry_Queue_Length : constant Name_Id := N + 307; Name_Max_Entry_Queue_Length : constant Name_Id := N + 310;
Name_Max_Size : constant Name_Id := N + 308; Name_Max_Size : constant Name_Id := N + 311;
Name_Mechanism : constant Name_Id := N + 309; Name_Mechanism : constant Name_Id := N + 312;
Name_Message : constant Name_Id := N + 310; Name_Message : constant Name_Id := N + 313;
Name_Mixedcase : constant Name_Id := N + 311; Name_Mixedcase : constant Name_Id := N + 314;
Name_Modified_GPL : constant Name_Id := N + 312; Name_Modified_GPL : constant Name_Id := N + 315;
Name_Name : constant Name_Id := N + 313; Name_Name : constant Name_Id := N + 316;
Name_NCA : constant Name_Id := N + 314; Name_NCA : constant Name_Id := N + 317;
Name_No : constant Name_Id := N + 315; Name_No : constant Name_Id := N + 318;
Name_No_Dependence : constant Name_Id := N + 316; Name_No_Dependence : constant Name_Id := N + 319;
Name_No_Dynamic_Attachment : constant Name_Id := N + 317; Name_No_Dynamic_Attachment : constant Name_Id := N + 320;
Name_No_Dynamic_Interrupts : constant Name_Id := N + 318; Name_No_Dynamic_Interrupts : constant Name_Id := N + 321;
Name_No_Requeue : constant Name_Id := N + 319; Name_No_Requeue : constant Name_Id := N + 322;
Name_No_Requeue_Statements : constant Name_Id := N + 320; Name_No_Requeue_Statements : constant Name_Id := N + 323;
Name_No_Task_Attributes : constant Name_Id := N + 321; Name_No_Task_Attributes : constant Name_Id := N + 324;
Name_No_Task_Attributes_Package : constant Name_Id := N + 322; Name_No_Task_Attributes_Package : constant Name_Id := N + 325;
Name_On : constant Name_Id := N + 323; Name_On : constant Name_Id := N + 326;
Name_Parameter_Types : constant Name_Id := N + 324; Name_Parameter_Types : constant Name_Id := N + 327;
Name_Reference : constant Name_Id := N + 325; Name_Reference : constant Name_Id := N + 328;
Name_Restricted : constant Name_Id := N + 326; Name_Restricted : constant Name_Id := N + 329;
Name_Result_Mechanism : constant Name_Id := N + 327; Name_Result_Mechanism : constant Name_Id := N + 330;
Name_Result_Type : constant Name_Id := N + 328; Name_Result_Type : constant Name_Id := N + 331;
Name_Runtime : constant Name_Id := N + 329; Name_Runtime : constant Name_Id := N + 332;
Name_SB : constant Name_Id := N + 330; Name_SB : constant Name_Id := N + 333;
Name_Secondary_Stack_Size : constant Name_Id := N + 331; Name_Secondary_Stack_Size : constant Name_Id := N + 334;
Name_Section : constant Name_Id := N + 332; Name_Section : constant Name_Id := N + 335;
Name_Semaphore : constant Name_Id := N + 333; Name_Semaphore : constant Name_Id := N + 336;
Name_Simple_Barriers : constant Name_Id := N + 334; Name_Simple_Barriers : constant Name_Id := N + 337;
Name_Spec_File_Name : constant Name_Id := N + 335; Name_Spec_File_Name : constant Name_Id := N + 338;
Name_State : constant Name_Id := N + 336; Name_State : constant Name_Id := N + 339;
Name_Static : constant Name_Id := N + 337; Name_Static : constant Name_Id := N + 340;
Name_Stack_Size : constant Name_Id := N + 338; Name_Stack_Size : constant Name_Id := N + 341;
Name_Subunit_File_Name : constant Name_Id := N + 339; Name_Subunit_File_Name : constant Name_Id := N + 342;
Name_Task_Stack_Size_Default : constant Name_Id := N + 340; Name_Task_Stack_Size_Default : constant Name_Id := N + 343;
Name_Task_Type : constant Name_Id := N + 341; Name_Task_Type : constant Name_Id := N + 344;
Name_Time_Slicing_Enabled : constant Name_Id := N + 342; Name_Time_Slicing_Enabled : constant Name_Id := N + 345;
Name_Top_Guard : constant Name_Id := N + 343; Name_Top_Guard : constant Name_Id := N + 346;
Name_UBA : constant Name_Id := N + 344; Name_UBA : constant Name_Id := N + 347;
Name_UBS : constant Name_Id := N + 345; Name_UBS : constant Name_Id := N + 348;
Name_UBSB : constant Name_Id := N + 346; Name_UBSB : constant Name_Id := N + 349;
Name_Unit_Name : constant Name_Id := N + 347; Name_Unit_Name : constant Name_Id := N + 350;
Name_Unknown : constant Name_Id := N + 348; Name_Unknown : constant Name_Id := N + 351;
Name_Unrestricted : constant Name_Id := N + 349; Name_Unrestricted : constant Name_Id := N + 352;
Name_Uppercase : constant Name_Id := N + 350; Name_Uppercase : constant Name_Id := N + 353;
Name_User : constant Name_Id := N + 351; Name_User : constant Name_Id := N + 354;
Name_VAX_Float : constant Name_Id := N + 352; Name_VAX_Float : constant Name_Id := N + 355;
Name_VMS : constant Name_Id := N + 353; Name_VMS : constant Name_Id := N + 356;
Name_Vtable_Ptr : constant Name_Id := N + 354; Name_Vtable_Ptr : constant Name_Id := N + 357;
Name_Working_Storage : constant Name_Id := N + 355; Name_Working_Storage : constant Name_Id := N + 358;
-- Names of recognized attributes. The entries with the comment "Ada 83" -- Names of recognized attributes. The entries with the comment "Ada 83"
-- are attributes that are defined in Ada 83, but not in Ada 95. These -- are attributes that are defined in Ada 83, but not in Ada 95. These
...@@ -641,168 +647,168 @@ package Snames is ...@@ -641,168 +647,168 @@ package Snames is
-- The entries marked VMS are recognized only in OpenVMS implementations -- The entries marked VMS are recognized only in OpenVMS implementations
-- of GNAT, and are treated as illegal in all other contexts. -- of GNAT, and are treated as illegal in all other contexts.
First_Attribute_Name : constant Name_Id := N + 356; First_Attribute_Name : constant Name_Id := N + 359;
Name_Abort_Signal : constant Name_Id := N + 356; -- GNAT Name_Abort_Signal : constant Name_Id := N + 359; -- GNAT
Name_Access : constant Name_Id := N + 357; Name_Access : constant Name_Id := N + 360;
Name_Address : constant Name_Id := N + 358; Name_Address : constant Name_Id := N + 361;
Name_Address_Size : constant Name_Id := N + 359; -- GNAT Name_Address_Size : constant Name_Id := N + 362; -- GNAT
Name_Aft : constant Name_Id := N + 360; Name_Aft : constant Name_Id := N + 363;
Name_Alignment : constant Name_Id := N + 361; Name_Alignment : constant Name_Id := N + 364;
Name_Asm_Input : constant Name_Id := N + 362; -- GNAT Name_Asm_Input : constant Name_Id := N + 365; -- GNAT
Name_Asm_Output : constant Name_Id := N + 363; -- GNAT Name_Asm_Output : constant Name_Id := N + 366; -- GNAT
Name_AST_Entry : constant Name_Id := N + 364; -- VMS Name_AST_Entry : constant Name_Id := N + 367; -- VMS
Name_Bit : constant Name_Id := N + 365; -- GNAT Name_Bit : constant Name_Id := N + 368; -- GNAT
Name_Bit_Order : constant Name_Id := N + 366; Name_Bit_Order : constant Name_Id := N + 369;
Name_Bit_Position : constant Name_Id := N + 367; -- GNAT Name_Bit_Position : constant Name_Id := N + 370; -- GNAT
Name_Body_Version : constant Name_Id := N + 368; Name_Body_Version : constant Name_Id := N + 371;
Name_Callable : constant Name_Id := N + 369; Name_Callable : constant Name_Id := N + 372;
Name_Caller : constant Name_Id := N + 370; Name_Caller : constant Name_Id := N + 373;
Name_Code_Address : constant Name_Id := N + 371; -- GNAT Name_Code_Address : constant Name_Id := N + 374; -- GNAT
Name_Component_Size : constant Name_Id := N + 372; Name_Component_Size : constant Name_Id := N + 375;
Name_Compose : constant Name_Id := N + 373; Name_Compose : constant Name_Id := N + 376;
Name_Constrained : constant Name_Id := N + 374; Name_Constrained : constant Name_Id := N + 377;
Name_Count : constant Name_Id := N + 375; Name_Count : constant Name_Id := N + 378;
Name_Default_Bit_Order : constant Name_Id := N + 376; -- GNAT Name_Default_Bit_Order : constant Name_Id := N + 379; -- GNAT
Name_Definite : constant Name_Id := N + 377; Name_Definite : constant Name_Id := N + 380;
Name_Delta : constant Name_Id := N + 378; Name_Delta : constant Name_Id := N + 381;
Name_Denorm : constant Name_Id := N + 379; Name_Denorm : constant Name_Id := N + 382;
Name_Digits : constant Name_Id := N + 380; Name_Digits : constant Name_Id := N + 383;
Name_Elaborated : constant Name_Id := N + 381; -- GNAT Name_Elaborated : constant Name_Id := N + 384; -- GNAT
Name_Emax : constant Name_Id := N + 382; -- Ada 83 Name_Emax : constant Name_Id := N + 385; -- Ada 83
Name_Enum_Rep : constant Name_Id := N + 383; -- GNAT Name_Enum_Rep : constant Name_Id := N + 386; -- GNAT
Name_Epsilon : constant Name_Id := N + 384; -- Ada 83 Name_Epsilon : constant Name_Id := N + 387; -- Ada 83
Name_Exponent : constant Name_Id := N + 385; Name_Exponent : constant Name_Id := N + 388;
Name_External_Tag : constant Name_Id := N + 386; Name_External_Tag : constant Name_Id := N + 389;
Name_First : constant Name_Id := N + 387; Name_First : constant Name_Id := N + 390;
Name_First_Bit : constant Name_Id := N + 388; Name_First_Bit : constant Name_Id := N + 391;
Name_Fixed_Value : constant Name_Id := N + 389; -- GNAT Name_Fixed_Value : constant Name_Id := N + 392; -- GNAT
Name_Fore : constant Name_Id := N + 390; Name_Fore : constant Name_Id := N + 393;
Name_Has_Access_Values : constant Name_Id := N + 391; -- GNAT Name_Has_Access_Values : constant Name_Id := N + 394; -- GNAT
Name_Has_Discriminants : constant Name_Id := N + 392; -- GNAT Name_Has_Discriminants : constant Name_Id := N + 395; -- GNAT
Name_Identity : constant Name_Id := N + 393; Name_Identity : constant Name_Id := N + 396;
Name_Img : constant Name_Id := N + 394; -- GNAT Name_Img : constant Name_Id := N + 397; -- GNAT
Name_Integer_Value : constant Name_Id := N + 395; -- GNAT Name_Integer_Value : constant Name_Id := N + 398; -- GNAT
Name_Large : constant Name_Id := N + 396; -- Ada 83 Name_Large : constant Name_Id := N + 399; -- Ada 83
Name_Last : constant Name_Id := N + 397; Name_Last : constant Name_Id := N + 400;
Name_Last_Bit : constant Name_Id := N + 398; Name_Last_Bit : constant Name_Id := N + 401;
Name_Leading_Part : constant Name_Id := N + 399; Name_Leading_Part : constant Name_Id := N + 402;
Name_Length : constant Name_Id := N + 400; Name_Length : constant Name_Id := N + 403;
Name_Machine_Emax : constant Name_Id := N + 401; Name_Machine_Emax : constant Name_Id := N + 404;
Name_Machine_Emin : constant Name_Id := N + 402; Name_Machine_Emin : constant Name_Id := N + 405;
Name_Machine_Mantissa : constant Name_Id := N + 403; Name_Machine_Mantissa : constant Name_Id := N + 406;
Name_Machine_Overflows : constant Name_Id := N + 404; Name_Machine_Overflows : constant Name_Id := N + 407;
Name_Machine_Radix : constant Name_Id := N + 405; Name_Machine_Radix : constant Name_Id := N + 408;
Name_Machine_Rounding : constant Name_Id := N + 406; -- Ada 05 Name_Machine_Rounding : constant Name_Id := N + 409; -- Ada 05
Name_Machine_Rounds : constant Name_Id := N + 407; Name_Machine_Rounds : constant Name_Id := N + 410;
Name_Machine_Size : constant Name_Id := N + 408; -- GNAT Name_Machine_Size : constant Name_Id := N + 411; -- GNAT
Name_Mantissa : constant Name_Id := N + 409; -- Ada 83 Name_Mantissa : constant Name_Id := N + 412; -- Ada 83
Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 410; Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 413;
Name_Maximum_Alignment : constant Name_Id := N + 411; -- GNAT Name_Maximum_Alignment : constant Name_Id := N + 414; -- GNAT
Name_Mechanism_Code : constant Name_Id := N + 412; -- GNAT Name_Mechanism_Code : constant Name_Id := N + 415; -- GNAT
Name_Mod : constant Name_Id := N + 413; Name_Mod : constant Name_Id := N + 416;
Name_Model_Emin : constant Name_Id := N + 414; Name_Model_Emin : constant Name_Id := N + 417;
Name_Model_Epsilon : constant Name_Id := N + 415; Name_Model_Epsilon : constant Name_Id := N + 418;
Name_Model_Mantissa : constant Name_Id := N + 416; Name_Model_Mantissa : constant Name_Id := N + 419;
Name_Model_Small : constant Name_Id := N + 417; Name_Model_Small : constant Name_Id := N + 420;
Name_Modulus : constant Name_Id := N + 418; Name_Modulus : constant Name_Id := N + 421;
Name_Null_Parameter : constant Name_Id := N + 419; -- GNAT Name_Null_Parameter : constant Name_Id := N + 422; -- GNAT
Name_Object_Size : constant Name_Id := N + 420; -- GNAT Name_Object_Size : constant Name_Id := N + 423; -- GNAT
Name_Partition_ID : constant Name_Id := N + 421; Name_Partition_ID : constant Name_Id := N + 424;
Name_Passed_By_Reference : constant Name_Id := N + 422; -- GNAT Name_Passed_By_Reference : constant Name_Id := N + 425; -- GNAT
Name_Pool_Address : constant Name_Id := N + 423; Name_Pool_Address : constant Name_Id := N + 426;
Name_Pos : constant Name_Id := N + 424; Name_Pos : constant Name_Id := N + 427;
Name_Position : constant Name_Id := N + 425; Name_Position : constant Name_Id := N + 428;
Name_Priority : constant Name_Id := N + 426; -- Ada 05 Name_Priority : constant Name_Id := N + 429; -- Ada 05
Name_Range : constant Name_Id := N + 427; Name_Range : constant Name_Id := N + 430;
Name_Range_Length : constant Name_Id := N + 428; -- GNAT Name_Range_Length : constant Name_Id := N + 431; -- GNAT
Name_Round : constant Name_Id := N + 429; Name_Round : constant Name_Id := N + 432;
Name_Safe_Emax : constant Name_Id := N + 430; -- Ada 83 Name_Safe_Emax : constant Name_Id := N + 433; -- Ada 83
Name_Safe_First : constant Name_Id := N + 431; Name_Safe_First : constant Name_Id := N + 434;
Name_Safe_Large : constant Name_Id := N + 432; -- Ada 83 Name_Safe_Large : constant Name_Id := N + 435; -- Ada 83
Name_Safe_Last : constant Name_Id := N + 433; Name_Safe_Last : constant Name_Id := N + 436;
Name_Safe_Small : constant Name_Id := N + 434; -- Ada 83 Name_Safe_Small : constant Name_Id := N + 437; -- Ada 83
Name_Scale : constant Name_Id := N + 435; Name_Scale : constant Name_Id := N + 438;
Name_Scaling : constant Name_Id := N + 436; Name_Scaling : constant Name_Id := N + 439;
Name_Signed_Zeros : constant Name_Id := N + 437; Name_Signed_Zeros : constant Name_Id := N + 440;
Name_Size : constant Name_Id := N + 438; Name_Size : constant Name_Id := N + 441;
Name_Small : constant Name_Id := N + 439; Name_Small : constant Name_Id := N + 442;
Name_Storage_Size : constant Name_Id := N + 440; Name_Storage_Size : constant Name_Id := N + 443;
Name_Storage_Unit : constant Name_Id := N + 441; -- GNAT Name_Storage_Unit : constant Name_Id := N + 444; -- GNAT
Name_Stream_Size : constant Name_Id := N + 442; -- Ada 05 Name_Stream_Size : constant Name_Id := N + 445; -- Ada 05
Name_Tag : constant Name_Id := N + 443; Name_Tag : constant Name_Id := N + 446;
Name_Target_Name : constant Name_Id := N + 444; -- GNAT Name_Target_Name : constant Name_Id := N + 447; -- GNAT
Name_Terminated : constant Name_Id := N + 445; Name_Terminated : constant Name_Id := N + 448;
Name_To_Address : constant Name_Id := N + 446; -- GNAT Name_To_Address : constant Name_Id := N + 449; -- GNAT
Name_Type_Class : constant Name_Id := N + 447; -- GNAT Name_Type_Class : constant Name_Id := N + 450; -- GNAT
Name_UET_Address : constant Name_Id := N + 448; -- GNAT Name_UET_Address : constant Name_Id := N + 451; -- GNAT
Name_Unbiased_Rounding : constant Name_Id := N + 449; Name_Unbiased_Rounding : constant Name_Id := N + 452;
Name_Unchecked_Access : constant Name_Id := N + 450; Name_Unchecked_Access : constant Name_Id := N + 453;
Name_Unconstrained_Array : constant Name_Id := N + 451; Name_Unconstrained_Array : constant Name_Id := N + 454;
Name_Universal_Literal_String : constant Name_Id := N + 452; -- GNAT Name_Universal_Literal_String : constant Name_Id := N + 455; -- GNAT
Name_Unrestricted_Access : constant Name_Id := N + 453; -- GNAT Name_Unrestricted_Access : constant Name_Id := N + 456; -- GNAT
Name_VADS_Size : constant Name_Id := N + 454; -- GNAT Name_VADS_Size : constant Name_Id := N + 457; -- GNAT
Name_Val : constant Name_Id := N + 455; Name_Val : constant Name_Id := N + 458;
Name_Valid : constant Name_Id := N + 456; Name_Valid : constant Name_Id := N + 459;
Name_Value_Size : constant Name_Id := N + 457; -- GNAT Name_Value_Size : constant Name_Id := N + 460; -- GNAT
Name_Version : constant Name_Id := N + 458; Name_Version : constant Name_Id := N + 461;
Name_Wchar_T_Size : constant Name_Id := N + 459; -- GNAT Name_Wchar_T_Size : constant Name_Id := N + 462; -- GNAT
Name_Wide_Wide_Width : constant Name_Id := N + 460; -- Ada 05 Name_Wide_Wide_Width : constant Name_Id := N + 463; -- Ada 05
Name_Wide_Width : constant Name_Id := N + 461; Name_Wide_Width : constant Name_Id := N + 464;
Name_Width : constant Name_Id := N + 462; Name_Width : constant Name_Id := N + 465;
Name_Word_Size : constant Name_Id := N + 463; -- GNAT Name_Word_Size : constant Name_Id := N + 466; -- GNAT
-- Attributes that designate attributes returning renamable functions, -- Attributes that designate attributes returning renamable functions,
-- i.e. functions that return other than a universal value and that -- i.e. functions that return other than a universal value and that
-- have non-universal arguments. -- have non-universal arguments.
First_Renamable_Function_Attribute : constant Name_Id := N + 464; First_Renamable_Function_Attribute : constant Name_Id := N + 467;
Name_Adjacent : constant Name_Id := N + 464; Name_Adjacent : constant Name_Id := N + 467;
Name_Ceiling : constant Name_Id := N + 465; Name_Ceiling : constant Name_Id := N + 468;
Name_Copy_Sign : constant Name_Id := N + 466; Name_Copy_Sign : constant Name_Id := N + 469;
Name_Floor : constant Name_Id := N + 467; Name_Floor : constant Name_Id := N + 470;
Name_Fraction : constant Name_Id := N + 468; Name_Fraction : constant Name_Id := N + 471;
Name_Image : constant Name_Id := N + 469; Name_Image : constant Name_Id := N + 472;
Name_Input : constant Name_Id := N + 470; Name_Input : constant Name_Id := N + 473;
Name_Machine : constant Name_Id := N + 471; Name_Machine : constant Name_Id := N + 474;
Name_Max : constant Name_Id := N + 472; Name_Max : constant Name_Id := N + 475;
Name_Min : constant Name_Id := N + 473; Name_Min : constant Name_Id := N + 476;
Name_Model : constant Name_Id := N + 474; Name_Model : constant Name_Id := N + 477;
Name_Pred : constant Name_Id := N + 475; Name_Pred : constant Name_Id := N + 478;
Name_Remainder : constant Name_Id := N + 476; Name_Remainder : constant Name_Id := N + 479;
Name_Rounding : constant Name_Id := N + 477; Name_Rounding : constant Name_Id := N + 480;
Name_Succ : constant Name_Id := N + 478; Name_Succ : constant Name_Id := N + 481;
Name_Truncation : constant Name_Id := N + 479; Name_Truncation : constant Name_Id := N + 482;
Name_Value : constant Name_Id := N + 480; Name_Value : constant Name_Id := N + 483;
Name_Wide_Image : constant Name_Id := N + 481; Name_Wide_Image : constant Name_Id := N + 484;
Name_Wide_Wide_Image : constant Name_Id := N + 482; Name_Wide_Wide_Image : constant Name_Id := N + 485;
Name_Wide_Value : constant Name_Id := N + 483; Name_Wide_Value : constant Name_Id := N + 486;
Name_Wide_Wide_Value : constant Name_Id := N + 484; Name_Wide_Wide_Value : constant Name_Id := N + 487;
Last_Renamable_Function_Attribute : constant Name_Id := N + 484; Last_Renamable_Function_Attribute : constant Name_Id := N + 487;
-- Attributes that designate procedures -- Attributes that designate procedures
First_Procedure_Attribute : constant Name_Id := N + 485; First_Procedure_Attribute : constant Name_Id := N + 488;
Name_Output : constant Name_Id := N + 485; Name_Output : constant Name_Id := N + 488;
Name_Read : constant Name_Id := N + 486; Name_Read : constant Name_Id := N + 489;
Name_Write : constant Name_Id := N + 487; Name_Write : constant Name_Id := N + 490;
Last_Procedure_Attribute : constant Name_Id := N + 487; Last_Procedure_Attribute : constant Name_Id := N + 490;
-- Remaining attributes are ones that return entities -- Remaining attributes are ones that return entities
First_Entity_Attribute_Name : constant Name_Id := N + 488; First_Entity_Attribute_Name : constant Name_Id := N + 491;
Name_Elab_Body : constant Name_Id := N + 488; -- GNAT Name_Elab_Body : constant Name_Id := N + 491; -- GNAT
Name_Elab_Spec : constant Name_Id := N + 489; -- GNAT Name_Elab_Spec : constant Name_Id := N + 492; -- GNAT
Name_Storage_Pool : constant Name_Id := N + 490; Name_Storage_Pool : constant Name_Id := N + 493;
-- These attributes are the ones that return types -- These attributes are the ones that return types
First_Type_Attribute_Name : constant Name_Id := N + 491; First_Type_Attribute_Name : constant Name_Id := N + 494;
Name_Base : constant Name_Id := N + 491; Name_Base : constant Name_Id := N + 494;
Name_Class : constant Name_Id := N + 492; Name_Class : constant Name_Id := N + 495;
Name_Stub_Type : constant Name_Id := N + 493; Name_Stub_Type : constant Name_Id := N + 496;
Last_Type_Attribute_Name : constant Name_Id := N + 493; Last_Type_Attribute_Name : constant Name_Id := N + 496;
Last_Entity_Attribute_Name : constant Name_Id := N + 493; Last_Entity_Attribute_Name : constant Name_Id := N + 496;
Last_Attribute_Name : constant Name_Id := N + 493; Last_Attribute_Name : constant Name_Id := N + 496;
-- Names of recognized locking policy identifiers -- Names of recognized locking policy identifiers
...@@ -810,10 +816,10 @@ package Snames is ...@@ -810,10 +816,10 @@ package Snames is
-- name (e.g. C for Ceiling_Locking). If new policy names are added, -- name (e.g. C for Ceiling_Locking). If new policy names are added,
-- the first character must be distinct. -- the first character must be distinct.
First_Locking_Policy_Name : constant Name_Id := N + 494; First_Locking_Policy_Name : constant Name_Id := N + 497;
Name_Ceiling_Locking : constant Name_Id := N + 494; Name_Ceiling_Locking : constant Name_Id := N + 497;
Name_Inheritance_Locking : constant Name_Id := N + 495; Name_Inheritance_Locking : constant Name_Id := N + 498;
Last_Locking_Policy_Name : constant Name_Id := N + 495; Last_Locking_Policy_Name : constant Name_Id := N + 498;
-- Names of recognized queuing policy identifiers -- Names of recognized queuing policy identifiers
...@@ -821,10 +827,10 @@ package Snames is ...@@ -821,10 +827,10 @@ package Snames is
-- name (e.g. F for FIFO_Queuing). If new policy names are added, -- name (e.g. F for FIFO_Queuing). If new policy names are added,
-- the first character must be distinct. -- the first character must be distinct.
First_Queuing_Policy_Name : constant Name_Id := N + 496; First_Queuing_Policy_Name : constant Name_Id := N + 499;
Name_FIFO_Queuing : constant Name_Id := N + 496; Name_FIFO_Queuing : constant Name_Id := N + 499;
Name_Priority_Queuing : constant Name_Id := N + 497; Name_Priority_Queuing : constant Name_Id := N + 500;
Last_Queuing_Policy_Name : constant Name_Id := N + 497; Last_Queuing_Policy_Name : constant Name_Id := N + 500;
-- Names of recognized task dispatching policy identifiers -- Names of recognized task dispatching policy identifiers
...@@ -832,249 +838,271 @@ package Snames is ...@@ -832,249 +838,271 @@ package Snames is
-- name (e.g. F for FIFO_Within_Priorities). If new policy names -- name (e.g. F for FIFO_Within_Priorities). If new policy names
-- are added, the first character must be distinct. -- are added, the first character must be distinct.
First_Task_Dispatching_Policy_Name : constant Name_Id := N + 498; First_Task_Dispatching_Policy_Name : constant Name_Id := N + 501;
Name_EDF_Across_Priorities : constant Name_Id := N + 498; Name_EDF_Across_Priorities : constant Name_Id := N + 501;
Name_FIFO_Within_Priorities : constant Name_Id := N + 499; Name_FIFO_Within_Priorities : constant Name_Id := N + 502;
Name_Non_Preemptive_Within_Priorities : constant Name_Id := N + 500; Name_Non_Preemptive_Within_Priorities : constant Name_Id := N + 503;
Name_Round_Robin_Within_Priorities : constant Name_Id := N + 501; Name_Round_Robin_Within_Priorities : constant Name_Id := N + 504;
Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 501; Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 504;
-- Names of recognized checks for pragma Suppress -- Names of recognized checks for pragma Suppress
First_Check_Name : constant Name_Id := N + 502; First_Check_Name : constant Name_Id := N + 505;
Name_Access_Check : constant Name_Id := N + 502; Name_Access_Check : constant Name_Id := N + 505;
Name_Accessibility_Check : constant Name_Id := N + 503; Name_Accessibility_Check : constant Name_Id := N + 506;
Name_Alignment_Check : constant Name_Id := N + 504; Name_Alignment_Check : constant Name_Id := N + 507;
Name_Discriminant_Check : constant Name_Id := N + 505; Name_Discriminant_Check : constant Name_Id := N + 508;
Name_Division_Check : constant Name_Id := N + 506; Name_Division_Check : constant Name_Id := N + 509;
Name_Elaboration_Check : constant Name_Id := N + 507; Name_Elaboration_Check : constant Name_Id := N + 510;
Name_Index_Check : constant Name_Id := N + 508; Name_Index_Check : constant Name_Id := N + 511;
Name_Length_Check : constant Name_Id := N + 509; Name_Length_Check : constant Name_Id := N + 512;
Name_Overflow_Check : constant Name_Id := N + 510; Name_Overflow_Check : constant Name_Id := N + 513;
Name_Range_Check : constant Name_Id := N + 511; Name_Range_Check : constant Name_Id := N + 514;
Name_Storage_Check : constant Name_Id := N + 512; Name_Storage_Check : constant Name_Id := N + 515;
Name_Tag_Check : constant Name_Id := N + 513; Name_Tag_Check : constant Name_Id := N + 516;
Name_Validity_Check : constant Name_Id := N + 514; Name_Validity_Check : constant Name_Id := N + 517;
Name_All_Checks : constant Name_Id := N + 515; Name_All_Checks : constant Name_Id := N + 518;
Last_Check_Name : constant Name_Id := N + 515; Last_Check_Name : constant Name_Id := N + 518;
-- Names corresponding to reserved keywords, excluding those already -- Names corresponding to reserved keywords, excluding those already
-- declared in the attribute list (Access, Delta, Digits, Mod, Range). -- declared in the attribute list (Access, Delta, Digits, Mod, Range).
Name_Abort : constant Name_Id := N + 516; Name_Abort : constant Name_Id := N + 519;
Name_Abs : constant Name_Id := N + 517; Name_Abs : constant Name_Id := N + 520;
Name_Accept : constant Name_Id := N + 518; Name_Accept : constant Name_Id := N + 521;
Name_And : constant Name_Id := N + 519; Name_And : constant Name_Id := N + 522;
Name_All : constant Name_Id := N + 520; Name_All : constant Name_Id := N + 523;
Name_Array : constant Name_Id := N + 521; Name_Array : constant Name_Id := N + 524;
Name_At : constant Name_Id := N + 522; Name_At : constant Name_Id := N + 525;
Name_Begin : constant Name_Id := N + 523; Name_Begin : constant Name_Id := N + 526;
Name_Body : constant Name_Id := N + 524; Name_Body : constant Name_Id := N + 527;
Name_Case : constant Name_Id := N + 525; Name_Case : constant Name_Id := N + 528;
Name_Constant : constant Name_Id := N + 526; Name_Constant : constant Name_Id := N + 529;
Name_Declare : constant Name_Id := N + 527; Name_Declare : constant Name_Id := N + 530;
Name_Delay : constant Name_Id := N + 528; Name_Delay : constant Name_Id := N + 531;
Name_Do : constant Name_Id := N + 529; Name_Do : constant Name_Id := N + 532;
Name_Else : constant Name_Id := N + 530; Name_Else : constant Name_Id := N + 533;
Name_Elsif : constant Name_Id := N + 531; Name_Elsif : constant Name_Id := N + 534;
Name_End : constant Name_Id := N + 532; Name_End : constant Name_Id := N + 535;
Name_Entry : constant Name_Id := N + 533; Name_Entry : constant Name_Id := N + 536;
Name_Exception : constant Name_Id := N + 534; Name_Exception : constant Name_Id := N + 537;
Name_Exit : constant Name_Id := N + 535; Name_Exit : constant Name_Id := N + 538;
Name_For : constant Name_Id := N + 536; Name_For : constant Name_Id := N + 539;
Name_Function : constant Name_Id := N + 537; Name_Function : constant Name_Id := N + 540;
Name_Generic : constant Name_Id := N + 538; Name_Generic : constant Name_Id := N + 541;
Name_Goto : constant Name_Id := N + 539; Name_Goto : constant Name_Id := N + 542;
Name_If : constant Name_Id := N + 540; Name_If : constant Name_Id := N + 543;
Name_In : constant Name_Id := N + 541; Name_In : constant Name_Id := N + 544;
Name_Is : constant Name_Id := N + 542; Name_Is : constant Name_Id := N + 545;
Name_Limited : constant Name_Id := N + 543; Name_Limited : constant Name_Id := N + 546;
Name_Loop : constant Name_Id := N + 544; Name_Loop : constant Name_Id := N + 547;
Name_New : constant Name_Id := N + 545; Name_New : constant Name_Id := N + 548;
Name_Not : constant Name_Id := N + 546; Name_Not : constant Name_Id := N + 549;
Name_Null : constant Name_Id := N + 547; Name_Null : constant Name_Id := N + 550;
Name_Of : constant Name_Id := N + 548; Name_Of : constant Name_Id := N + 551;
Name_Or : constant Name_Id := N + 549; Name_Or : constant Name_Id := N + 552;
Name_Others : constant Name_Id := N + 550; Name_Others : constant Name_Id := N + 553;
Name_Out : constant Name_Id := N + 551; Name_Out : constant Name_Id := N + 554;
Name_Package : constant Name_Id := N + 552; Name_Package : constant Name_Id := N + 555;
Name_Pragma : constant Name_Id := N + 553; Name_Pragma : constant Name_Id := N + 556;
Name_Private : constant Name_Id := N + 554; Name_Private : constant Name_Id := N + 557;
Name_Procedure : constant Name_Id := N + 555; Name_Procedure : constant Name_Id := N + 558;
Name_Raise : constant Name_Id := N + 556; Name_Raise : constant Name_Id := N + 559;
Name_Record : constant Name_Id := N + 557; Name_Record : constant Name_Id := N + 560;
Name_Rem : constant Name_Id := N + 558; Name_Rem : constant Name_Id := N + 561;
Name_Renames : constant Name_Id := N + 559; Name_Renames : constant Name_Id := N + 562;
Name_Return : constant Name_Id := N + 560; Name_Return : constant Name_Id := N + 563;
Name_Reverse : constant Name_Id := N + 561; Name_Reverse : constant Name_Id := N + 564;
Name_Select : constant Name_Id := N + 562; Name_Select : constant Name_Id := N + 565;
Name_Separate : constant Name_Id := N + 563; Name_Separate : constant Name_Id := N + 566;
Name_Subtype : constant Name_Id := N + 564; Name_Subtype : constant Name_Id := N + 567;
Name_Task : constant Name_Id := N + 565; Name_Task : constant Name_Id := N + 568;
Name_Terminate : constant Name_Id := N + 566; Name_Terminate : constant Name_Id := N + 569;
Name_Then : constant Name_Id := N + 567; Name_Then : constant Name_Id := N + 570;
Name_Type : constant Name_Id := N + 568; Name_Type : constant Name_Id := N + 571;
Name_Use : constant Name_Id := N + 569; Name_Use : constant Name_Id := N + 572;
Name_When : constant Name_Id := N + 570; Name_When : constant Name_Id := N + 573;
Name_While : constant Name_Id := N + 571; Name_While : constant Name_Id := N + 574;
Name_With : constant Name_Id := N + 572; Name_With : constant Name_Id := N + 575;
Name_Xor : constant Name_Id := N + 573; Name_Xor : constant Name_Id := N + 576;
-- Names of intrinsic subprograms -- Names of intrinsic subprograms
-- Note: Asm is missing from this list, since Asm is a legitimate -- Note: Asm is missing from this list, since Asm is a legitimate
-- convention name. So is To_Adress, which is a GNAT attribute. -- convention name. So is To_Adress, which is a GNAT attribute.
First_Intrinsic_Name : constant Name_Id := N + 574; First_Intrinsic_Name : constant Name_Id := N + 577;
Name_Divide : constant Name_Id := N + 574; Name_Divide : constant Name_Id := N + 577;
Name_Enclosing_Entity : constant Name_Id := N + 575; Name_Enclosing_Entity : constant Name_Id := N + 578;
Name_Exception_Information : constant Name_Id := N + 576; Name_Exception_Information : constant Name_Id := N + 579;
Name_Exception_Message : constant Name_Id := N + 577; Name_Exception_Message : constant Name_Id := N + 580;
Name_Exception_Name : constant Name_Id := N + 578; Name_Exception_Name : constant Name_Id := N + 581;
Name_File : constant Name_Id := N + 579; Name_File : constant Name_Id := N + 582;
Name_Generic_Dispatching_Constructor : constant Name_Id := N + 580; Name_Generic_Dispatching_Constructor : constant Name_Id := N + 583;
Name_Import_Address : constant Name_Id := N + 581; Name_Import_Address : constant Name_Id := N + 584;
Name_Import_Largest_Value : constant Name_Id := N + 582; Name_Import_Largest_Value : constant Name_Id := N + 585;
Name_Import_Value : constant Name_Id := N + 583; Name_Import_Value : constant Name_Id := N + 586;
Name_Is_Negative : constant Name_Id := N + 584; Name_Is_Negative : constant Name_Id := N + 587;
Name_Line : constant Name_Id := N + 585; Name_Line : constant Name_Id := N + 588;
Name_Rotate_Left : constant Name_Id := N + 586; Name_Rotate_Left : constant Name_Id := N + 589;
Name_Rotate_Right : constant Name_Id := N + 587; Name_Rotate_Right : constant Name_Id := N + 590;
Name_Shift_Left : constant Name_Id := N + 588; Name_Shift_Left : constant Name_Id := N + 591;
Name_Shift_Right : constant Name_Id := N + 589; Name_Shift_Right : constant Name_Id := N + 592;
Name_Shift_Right_Arithmetic : constant Name_Id := N + 590; Name_Shift_Right_Arithmetic : constant Name_Id := N + 593;
Name_Source_Location : constant Name_Id := N + 591; Name_Source_Location : constant Name_Id := N + 594;
Name_Unchecked_Conversion : constant Name_Id := N + 592; Name_Unchecked_Conversion : constant Name_Id := N + 595;
Name_Unchecked_Deallocation : constant Name_Id := N + 593; Name_Unchecked_Deallocation : constant Name_Id := N + 596;
Name_To_Pointer : constant Name_Id := N + 594; Name_To_Pointer : constant Name_Id := N + 597;
Last_Intrinsic_Name : constant Name_Id := N + 594; Last_Intrinsic_Name : constant Name_Id := N + 597;
-- Names used in processing intrinsic calls -- Names used in processing intrinsic calls
Name_Free : constant Name_Id := N + 595; Name_Free : constant Name_Id := N + 598;
-- Reserved words used only in Ada 95 -- Reserved words used only in Ada 95
First_95_Reserved_Word : constant Name_Id := N + 596; First_95_Reserved_Word : constant Name_Id := N + 599;
Name_Abstract : constant Name_Id := N + 596; Name_Abstract : constant Name_Id := N + 599;
Name_Aliased : constant Name_Id := N + 597; Name_Aliased : constant Name_Id := N + 600;
Name_Protected : constant Name_Id := N + 598; Name_Protected : constant Name_Id := N + 601;
Name_Until : constant Name_Id := N + 599; Name_Until : constant Name_Id := N + 602;
Name_Requeue : constant Name_Id := N + 600; Name_Requeue : constant Name_Id := N + 603;
Name_Tagged : constant Name_Id := N + 601; Name_Tagged : constant Name_Id := N + 604;
Last_95_Reserved_Word : constant Name_Id := N + 601; Last_95_Reserved_Word : constant Name_Id := N + 604;
subtype Ada_95_Reserved_Words is subtype Ada_95_Reserved_Words is
Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word; Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word;
-- Miscellaneous names used in semantic checking -- Miscellaneous names used in semantic checking
Name_Raise_Exception : constant Name_Id := N + 602; Name_Raise_Exception : constant Name_Id := N + 605;
-- Additional reserved words and identifiers used in GNAT Project Files -- Additional reserved words and identifiers used in GNAT Project Files
-- Note that Name_External is already previously declared -- Note that Name_External is already previously declared
Name_Ada_Roots : constant Name_Id := N + 603; Name_Ada_Roots : constant Name_Id := N + 606;
Name_Archive_Builder : constant Name_Id := N + 604; Name_Archive_Builder : constant Name_Id := N + 607;
Name_Archive_Indexer : constant Name_Id := N + 605; Name_Archive_Indexer : constant Name_Id := N + 608;
Name_Binder : constant Name_Id := N + 606; Name_Archive_Suffix : constant Name_Id := N + 609;
Name_Binder_Driver : constant Name_Id := N + 607; Name_Binder : constant Name_Id := N + 610;
Name_Body_Suffix : constant Name_Id := N + 608; Name_Binder_Driver : constant Name_Id := N + 611;
Name_Builder : constant Name_Id := N + 609; Name_Body_Suffix : constant Name_Id := N + 612;
Name_Compiler : constant Name_Id := N + 610; Name_Builder : constant Name_Id := N + 613;
Name_Compiler_Driver : constant Name_Id := N + 611; Name_Builder_Switches : constant Name_Id := N + 614;
Name_Compiler_Kind : constant Name_Id := N + 612; Name_Compiler : constant Name_Id := N + 615;
Name_Compiler_Pic_Option : constant Name_Id := N + 613; Name_Compiler_Driver : constant Name_Id := N + 616;
Name_Compute_Dependency : constant Name_Id := N + 614; Name_Compiler_Kind : constant Name_Id := N + 617;
Name_Config_Body_File_Name : constant Name_Id := N + 615; Name_Compiler_Minimum_Options : constant Name_Id := N + 618;
Name_Config_Body_File_Name_Pattern : constant Name_Id := N + 616; Name_Compiler_Pic_Option : constant Name_Id := N + 619;
Name_Config_File_Switches : constant Name_Id := N + 617; Name_Compute_Dependency : constant Name_Id := N + 620;
Name_Config_File_Unique : constant Name_Id := N + 618; Name_Config_Body_File_Name : constant Name_Id := N + 621;
Name_Config_Spec_File_Name : constant Name_Id := N + 619; Name_Config_Body_File_Name_Pattern : constant Name_Id := N + 622;
Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + 620; Name_Config_File_Switches : constant Name_Id := N + 623;
Name_Cross_Reference : constant Name_Id := N + 621; Name_Config_File_Unique : constant Name_Id := N + 624;
Name_Default_Builder_Switches : constant Name_Id := N + 622; Name_Config_Spec_File_Name : constant Name_Id := N + 625;
Name_Default_Global_Compiler_Switches : constant Name_Id := N + 623; Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + 626;
Name_Default_Language : constant Name_Id := N + 624; Name_Cross_Reference : constant Name_Id := N + 627;
Name_Default_Linker : constant Name_Id := N + 625; Name_Default_Builder_Switches : constant Name_Id := N + 628;
Name_Default_Switches : constant Name_Id := N + 626; Name_Default_Global_Compiler_Switches : constant Name_Id := N + 629;
Name_Dependency_File_Kind : constant Name_Id := N + 627; Name_Default_Language : constant Name_Id := N + 630;
Name_Dependency_Option : constant Name_Id := N + 628; Name_Default_Linker : constant Name_Id := N + 631;
Name_Exec_Dir : constant Name_Id := N + 629; Name_Default_Switches : constant Name_Id := N + 632;
Name_Executable : constant Name_Id := N + 630; Name_Dependency_File_Kind : constant Name_Id := N + 633;
Name_Executable_Suffix : constant Name_Id := N + 631; Name_Dependency_Option : constant Name_Id := N + 634;
Name_Extends : constant Name_Id := N + 632; Name_Exec_Dir : constant Name_Id := N + 635;
Name_Externally_Built : constant Name_Id := N + 633; Name_Executable : constant Name_Id := N + 636;
Name_Finder : constant Name_Id := N + 634; Name_Executable_Suffix : constant Name_Id := N + 637;
Name_Global_Compiler_Switches : constant Name_Id := N + 635; Name_Extends : constant Name_Id := N + 638;
Name_Global_Configuration_Pragmas : constant Name_Id := N + 636; Name_Externally_Built : constant Name_Id := N + 639;
Name_Gnatls : constant Name_Id := N + 637; Name_Finder : constant Name_Id := N + 640;
Name_Gnatstub : constant Name_Id := N + 638; Name_Global_Compiler_Switches : constant Name_Id := N + 641;
Name_Implementation : constant Name_Id := N + 639; Name_Global_Configuration_Pragmas : constant Name_Id := N + 642;
Name_Implementation_Exceptions : constant Name_Id := N + 640; Name_Global_Config_File : constant Name_Id := N + 643;
Name_Implementation_Suffix : constant Name_Id := N + 641; Name_Gnatls : constant Name_Id := N + 644;
Name_Include_Option : constant Name_Id := N + 642; Name_Gnatstub : constant Name_Id := N + 645;
Name_Include_Path : constant Name_Id := N + 643; Name_Implementation : constant Name_Id := N + 646;
Name_Include_Path_File : constant Name_Id := N + 644; Name_Implementation_Exceptions : constant Name_Id := N + 647;
Name_Language_Kind : constant Name_Id := N + 645; Name_Implementation_Suffix : constant Name_Id := N + 648;
Name_Language_Processing : constant Name_Id := N + 646; Name_Include_Option : constant Name_Id := N + 649;
Name_Languages : constant Name_Id := N + 647; Name_Include_Path : constant Name_Id := N + 650;
Name_Library_Ali_Dir : constant Name_Id := N + 648; Name_Include_Path_File : constant Name_Id := N + 651;
Name_Library_Dir : constant Name_Id := N + 649; Name_Language_Kind : constant Name_Id := N + 652;
Name_Library_Auto_Init : constant Name_Id := N + 650; Name_Language_Processing : constant Name_Id := N + 653;
Name_Library_GCC : constant Name_Id := N + 651; Name_Languages : constant Name_Id := N + 654;
Name_Library_Interface : constant Name_Id := N + 652; Name_Library_Ali_Dir : constant Name_Id := N + 655;
Name_Library_Kind : constant Name_Id := N + 653; Name_Library_Auto_Init : constant Name_Id := N + 656;
Name_Library_Name : constant Name_Id := N + 654; Name_Library_Auto_Init_Supported : constant Name_Id := N + 657;
Name_Library_Options : constant Name_Id := N + 655; Name_Library_Builder : constant Name_Id := N + 658;
Name_Library_Reference_Symbol_File : constant Name_Id := N + 656; Name_Library_Dir : constant Name_Id := N + 659;
Name_Library_Src_Dir : constant Name_Id := N + 657; Name_Library_GCC : constant Name_Id := N + 660;
Name_Library_Symbol_File : constant Name_Id := N + 658; Name_Library_Interface : constant Name_Id := N + 661;
Name_Library_Symbol_Policy : constant Name_Id := N + 659; Name_Library_Kind : constant Name_Id := N + 662;
Name_Library_Version : constant Name_Id := N + 660; Name_Library_Name : constant Name_Id := N + 663;
Name_Linker : constant Name_Id := N + 661; Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + 664;
Name_Linker_Executable_Option : constant Name_Id := N + 662; Name_Library_Options : constant Name_Id := N + 665;
Name_Linker_Lib_Dir_Option : constant Name_Id := N + 663; Name_Library_Reference_Symbol_File : constant Name_Id := N + 666;
Name_Linker_Lib_Name_Option : constant Name_Id := N + 664; Name_Library_Src_Dir : constant Name_Id := N + 667;
Name_Local_Configuration_Pragmas : constant Name_Id := N + 665; Name_Library_Support : constant Name_Id := N + 668;
Name_Locally_Removed_Files : constant Name_Id := N + 666; Name_Library_Symbol_File : constant Name_Id := N + 669;
Name_Mapping_File_Switches : constant Name_Id := N + 667; Name_Library_Symbol_Policy : constant Name_Id := N + 670;
Name_Metrics : constant Name_Id := N + 668; Name_Library_Version : constant Name_Id := N + 671;
Name_Naming : constant Name_Id := N + 669; Name_Library_Version_Options : constant Name_Id := N + 672;
Name_Object_Dir : constant Name_Id := N + 670; Name_Linker : constant Name_Id := N + 673;
Name_Pretty_Printer : constant Name_Id := N + 671; Name_Linker_Executable_Option : constant Name_Id := N + 674;
Name_Project : constant Name_Id := N + 672; Name_Linker_Lib_Dir_Option : constant Name_Id := N + 675;
Name_Roots : constant Name_Id := N + 673; Name_Linker_Lib_Name_Option : constant Name_Id := N + 676;
Name_Runtime_Project : constant Name_Id := N + 674; Name_Local_Config_File : constant Name_Id := N + 677;
Name_Separate_Suffix : constant Name_Id := N + 675; Name_Local_Configuration_Pragmas : constant Name_Id := N + 678;
Name_Source_Dirs : constant Name_Id := N + 676; Name_Locally_Removed_Files : constant Name_Id := N + 679;
Name_Source_Files : constant Name_Id := N + 677; Name_Mapping_File_Switches : constant Name_Id := N + 680;
Name_Source_List_File : constant Name_Id := N + 678; Name_Mapping_Spec_Suffix : constant Name_Id := N + 681;
Name_Spec : constant Name_Id := N + 679; Name_Mapping_Body_Suffix : constant Name_Id := N + 682;
Name_Spec_Suffix : constant Name_Id := N + 680; Name_Metrics : constant Name_Id := N + 683;
Name_Specification : constant Name_Id := N + 681; Name_Minimum_Binder_Options : constant Name_Id := N + 684;
Name_Specification_Exceptions : constant Name_Id := N + 682; Name_Naming : constant Name_Id := N + 685;
Name_Specification_Suffix : constant Name_Id := N + 683; Name_Objects_Path : constant Name_Id := N + 686;
Name_Switches : constant Name_Id := N + 684; Name_Objects_Path_File : constant Name_Id := N + 687;
Name_Object_Dir : constant Name_Id := N + 688;
Name_Pretty_Printer : constant Name_Id := N + 689;
Name_Project : constant Name_Id := N + 690;
Name_Roots : constant Name_Id := N + 691;
Name_Run_Path_Option : constant Name_Id := N + 692;
Name_Runtime_Project : constant Name_Id := N + 693;
Name_Shared_Library_Minimum_Options : constant Name_Id := N + 694;
Name_Shared_Library_Prefix : constant Name_Id := N + 695;
Name_Shared_Library_Suffix : constant Name_Id := N + 696;
Name_Separate_Suffix : constant Name_Id := N + 697;
Name_Source_Dirs : constant Name_Id := N + 698;
Name_Source_Files : constant Name_Id := N + 699;
Name_Source_List_File : constant Name_Id := N + 700;
Name_Spec : constant Name_Id := N + 701;
Name_Spec_Suffix : constant Name_Id := N + 702;
Name_Specification : constant Name_Id := N + 703;
Name_Specification_Exceptions : constant Name_Id := N + 704;
Name_Specification_Suffix : constant Name_Id := N + 705;
Name_Stack : constant Name_Id := N + 706;
Name_Switches : constant Name_Id := N + 707;
Name_Symbolic_Link_Supported : constant Name_Id := N + 708;
Name_Toolchain_Version : constant Name_Id := N + 709;
-- Other miscellaneous names used in front end -- Other miscellaneous names used in front end
Name_Unaligned_Valid : constant Name_Id := N + 685; Name_Unaligned_Valid : constant Name_Id := N + 710;
-- Ada 2005 reserved words -- Ada 2005 reserved words
First_2005_Reserved_Word : constant Name_Id := N + 686; First_2005_Reserved_Word : constant Name_Id := N + 711;
Name_Interface : constant Name_Id := N + 686; Name_Interface : constant Name_Id := N + 711;
Name_Overriding : constant Name_Id := N + 687; Name_Overriding : constant Name_Id := N + 712;
Name_Synchronized : constant Name_Id := N + 688; Name_Synchronized : constant Name_Id := N + 713;
Last_2005_Reserved_Word : constant Name_Id := N + 688; Last_2005_Reserved_Word : constant Name_Id := N + 713;
subtype Ada_2005_Reserved_Words is subtype Ada_2005_Reserved_Words is
Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word; Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word;
-- Mark last defined name for consistency check in Snames body -- Mark last defined name for consistency check in Snames body
Last_Predefined_Name : constant Name_Id := N + 688; Last_Predefined_Name : constant Name_Id := N + 713;
--------------------------------------- ---------------------------------------
-- Subtypes Defining Name Categories -- -- Subtypes Defining Name Categories --
...@@ -1299,6 +1327,7 @@ package Snames is ...@@ -1299,6 +1327,7 @@ package Snames is
Pragma_Ada_2005, Pragma_Ada_2005,
Pragma_Assertion_Policy, Pragma_Assertion_Policy,
Pragma_C_Pass_By_Copy, Pragma_C_Pass_By_Copy,
Pragma_Compile_Time_Error,
Pragma_Compile_Time_Warning, Pragma_Compile_Time_Warning,
Pragma_Component_Alignment, Pragma_Component_Alignment,
Pragma_Convention_Identifier, Pragma_Convention_Identifier,
...@@ -1441,6 +1470,7 @@ package Snames is ...@@ -1441,6 +1470,7 @@ package Snames is
Pragma_Unchecked_Union, Pragma_Unchecked_Union,
Pragma_Unimplemented_Unit, Pragma_Unimplemented_Unit,
Pragma_Unreferenced, Pragma_Unreferenced,
Pragma_Unreferenced_Objects,
Pragma_Unreserve_All_Interrupts, Pragma_Unreserve_All_Interrupts,
Pragma_Volatile, Pragma_Volatile,
Pragma_Volatile_Components, Pragma_Volatile_Components,
......
...@@ -220,153 +220,155 @@ extern unsigned char Get_Pragma_Id (int); ...@@ -220,153 +220,155 @@ extern unsigned char Get_Pragma_Id (int);
#define Pragma_Ada_2005 3 #define Pragma_Ada_2005 3
#define Pragma_Assertion_Policy 4 #define Pragma_Assertion_Policy 4
#define Pragma_C_Pass_By_Copy 5 #define Pragma_C_Pass_By_Copy 5
#define Pragma_Compile_Time_Warning 6 #define Pragma_Compile_Time_Error 6
#define Pragma_Component_Alignment 7 #define Pragma_Compile_Time_Warning 7
#define Pragma_Convention_Identifier 8 #define Pragma_Component_Alignment 8
#define Pragma_Debug_Policy 9 #define Pragma_Convention_Identifier 9
#define Pragma_Detect_Blocking 10 #define Pragma_Debug_Policy 10
#define Pragma_Discard_Names 11 #define Pragma_Detect_Blocking 11
#define Pragma_Elaboration_Checks 12 #define Pragma_Discard_Names 12
#define Pragma_Eliminate 13 #define Pragma_Elaboration_Checks 13
#define Pragma_Explicit_Overriding 14 #define Pragma_Eliminate 14
#define Pragma_Extend_System 15 #define Pragma_Explicit_Overriding 15
#define Pragma_Extensions_Allowed 16 #define Pragma_Extend_System 16
#define Pragma_External_Name_Casing 17 #define Pragma_Extensions_Allowed 17
#define Pragma_Float_Representation 18 #define Pragma_External_Name_Casing 18
#define Pragma_Initialize_Scalars 19 #define Pragma_Float_Representation 19
#define Pragma_Interrupt_State 20 #define Pragma_Initialize_Scalars 20
#define Pragma_License 21 #define Pragma_Interrupt_State 21
#define Pragma_Locking_Policy 22 #define Pragma_License 22
#define Pragma_Long_Float 23 #define Pragma_Locking_Policy 23
#define Pragma_No_Run_Time 24 #define Pragma_Long_Float 24
#define Pragma_No_Strict_Aliasing 25 #define Pragma_No_Run_Time 25
#define Pragma_Normalize_Scalars 26 #define Pragma_No_Strict_Aliasing 26
#define Pragma_Polling 27 #define Pragma_Normalize_Scalars 27
#define Pragma_Persistent_BSS 28 #define Pragma_Polling 28
#define Pragma_Priority_Specific_Dispatching 29 #define Pragma_Persistent_BSS 29
#define Pragma_Profile 30 #define Pragma_Priority_Specific_Dispatching 30
#define Pragma_Profile_Warnings 31 #define Pragma_Profile 31
#define Pragma_Propagate_Exceptions 32 #define Pragma_Profile_Warnings 32
#define Pragma_Queuing_Policy 33 #define Pragma_Propagate_Exceptions 33
#define Pragma_Ravenscar 34 #define Pragma_Queuing_Policy 34
#define Pragma_Restricted_Run_Time 35 #define Pragma_Ravenscar 35
#define Pragma_Restrictions 36 #define Pragma_Restricted_Run_Time 36
#define Pragma_Restriction_Warnings 37 #define Pragma_Restrictions 37
#define Pragma_Reviewable 38 #define Pragma_Restriction_Warnings 38
#define Pragma_Source_File_Name 39 #define Pragma_Reviewable 39
#define Pragma_Source_File_Name_Project 40 #define Pragma_Source_File_Name 40
#define Pragma_Style_Checks 41 #define Pragma_Source_File_Name_Project 41
#define Pragma_Suppress 42 #define Pragma_Style_Checks 42
#define Pragma_Suppress_Exception_Locations 43 #define Pragma_Suppress 43
#define Pragma_Task_Dispatching_Policy 44 #define Pragma_Suppress_Exception_Locations 44
#define Pragma_Universal_Data 45 #define Pragma_Task_Dispatching_Policy 45
#define Pragma_Unsuppress 46 #define Pragma_Universal_Data 46
#define Pragma_Use_VADS_Size 47 #define Pragma_Unsuppress 47
#define Pragma_Validity_Checks 48 #define Pragma_Use_VADS_Size 48
#define Pragma_Warnings 49 #define Pragma_Validity_Checks 49
#define Pragma_Wide_Character_Encoding 50 #define Pragma_Warnings 50
#define Pragma_Abort_Defer 51 #define Pragma_Wide_Character_Encoding 51
#define Pragma_All_Calls_Remote 52 #define Pragma_Abort_Defer 52
#define Pragma_Annotate 53 #define Pragma_All_Calls_Remote 53
#define Pragma_Assert 54 #define Pragma_Annotate 54
#define Pragma_Asynchronous 55 #define Pragma_Assert 55
#define Pragma_Atomic 56 #define Pragma_Asynchronous 56
#define Pragma_Atomic_Components 57 #define Pragma_Atomic 57
#define Pragma_Attach_Handler 58 #define Pragma_Atomic_Components 58
#define Pragma_Comment 59 #define Pragma_Attach_Handler 59
#define Pragma_Common_Object 60 #define Pragma_Comment 60
#define Pragma_Complete_Representation 61 #define Pragma_Common_Object 61
#define Pragma_Complex_Representation 62 #define Pragma_Complete_Representation 62
#define Pragma_Controlled 63 #define Pragma_Complex_Representation 63
#define Pragma_Convention 64 #define Pragma_Controlled 64
#define Pragma_CPP_Class 65 #define Pragma_Convention 65
#define Pragma_CPP_Constructor 66 #define Pragma_CPP_Class 66
#define Pragma_CPP_Virtual 67 #define Pragma_CPP_Constructor 67
#define Pragma_CPP_Vtable 68 #define Pragma_CPP_Virtual 68
#define Pragma_Debug 69 #define Pragma_CPP_Vtable 69
#define Pragma_Elaborate 70 #define Pragma_Debug 70
#define Pragma_Elaborate_All 71 #define Pragma_Elaborate 71
#define Pragma_Elaborate_Body 72 #define Pragma_Elaborate_All 72
#define Pragma_Export 73 #define Pragma_Elaborate_Body 73
#define Pragma_Export_Exception 74 #define Pragma_Export 74
#define Pragma_Export_Function 75 #define Pragma_Export_Exception 75
#define Pragma_Export_Object 76 #define Pragma_Export_Function 76
#define Pragma_Export_Procedure 77 #define Pragma_Export_Object 77
#define Pragma_Export_Value 78 #define Pragma_Export_Procedure 78
#define Pragma_Export_Valued_Procedure 79 #define Pragma_Export_Value 79
#define Pragma_External 80 #define Pragma_Export_Valued_Procedure 80
#define Pragma_Finalize_Storage_Only 81 #define Pragma_External 81
#define Pragma_Ident 82 #define Pragma_Finalize_Storage_Only 82
#define Pragma_Import 83 #define Pragma_Ident 83
#define Pragma_Import_Exception 84 #define Pragma_Import 84
#define Pragma_Import_Function 85 #define Pragma_Import_Exception 85
#define Pragma_Import_Object 86 #define Pragma_Import_Function 86
#define Pragma_Import_Procedure 87 #define Pragma_Import_Object 87
#define Pragma_Import_Valued_Procedure 88 #define Pragma_Import_Procedure 88
#define Pragma_Inline 89 #define Pragma_Import_Valued_Procedure 89
#define Pragma_Inline_Always 90 #define Pragma_Inline 90
#define Pragma_Inline_Generic 91 #define Pragma_Inline_Always 91
#define Pragma_Inspection_Point 92 #define Pragma_Inline_Generic 92
#define Pragma_Interface_Name 93 #define Pragma_Inspection_Point 93
#define Pragma_Interrupt_Handler 94 #define Pragma_Interface_Name 94
#define Pragma_Interrupt_Priority 95 #define Pragma_Interrupt_Handler 95
#define Pragma_Java_Constructor 96 #define Pragma_Interrupt_Priority 96
#define Pragma_Java_Interface 97 #define Pragma_Java_Constructor 97
#define Pragma_Keep_Names 98 #define Pragma_Java_Interface 98
#define Pragma_Link_With 99 #define Pragma_Keep_Names 99
#define Pragma_Linker_Alias 100 #define Pragma_Link_With 100
#define Pragma_Linker_Constructor 101 #define Pragma_Linker_Alias 101
#define Pragma_Linker_Destructor 102 #define Pragma_Linker_Constructor 102
#define Pragma_Linker_Options 103 #define Pragma_Linker_Destructor 103
#define Pragma_Linker_Section 104 #define Pragma_Linker_Options 104
#define Pragma_List 105 #define Pragma_Linker_Section 105
#define Pragma_Machine_Attribute 106 #define Pragma_List 106
#define Pragma_Main 107 #define Pragma_Machine_Attribute 107
#define Pragma_Main_Storage 108 #define Pragma_Main 108
#define Pragma_Memory_Size 109 #define Pragma_Main_Storage 109
#define Pragma_No_Return 110 #define Pragma_Memory_Size 110
#define Pragma_Obsolescent 111 #define Pragma_No_Return 111
#define Pragma_Optimize 112 #define Pragma_Obsolescent 112
#define Pragma_Optional_Overriding 113 #define Pragma_Optimize 113
#define Pragma_Pack 114 #define Pragma_Optional_Overriding 114
#define Pragma_Page 115 #define Pragma_Pack 115
#define Pragma_Passive 116 #define Pragma_Page 116
#define Pragma_Preelaborable_Initialization 117 #define Pragma_Passive 117
#define Pragma_Preelaborate 118 #define Pragma_Preelaborable_Initialization 118
#define Pragma_Preelaborate_05 119 #define Pragma_Preelaborate 119
#define Pragma_Psect_Object 120 #define Pragma_Preelaborate_05 120
#define Pragma_Pure 121 #define Pragma_Psect_Object 121
#define Pragma_Pure_05 122 #define Pragma_Pure 122
#define Pragma_Pure_Function 123 #define Pragma_Pure_05 123
#define Pragma_Remote_Call_Interface 124 #define Pragma_Pure_Function 124
#define Pragma_Remote_Types 125 #define Pragma_Remote_Call_Interface 125
#define Pragma_Share_Generic 126 #define Pragma_Remote_Types 126
#define Pragma_Shared 127 #define Pragma_Share_Generic 127
#define Pragma_Shared_Passive 128 #define Pragma_Shared 128
#define Pragma_Source_Reference 129 #define Pragma_Shared_Passive 129
#define Pragma_Stream_Convert 130 #define Pragma_Source_Reference 130
#define Pragma_Subtitle 131 #define Pragma_Stream_Convert 131
#define Pragma_Suppress_All 132 #define Pragma_Subtitle 132
#define Pragma_Suppress_Debug_Info 133 #define Pragma_Suppress_All 133
#define Pragma_Suppress_Initialization 134 #define Pragma_Suppress_Debug_Info 134
#define Pragma_System_Name 135 #define Pragma_Suppress_Initialization 135
#define Pragma_Task_Info 136 #define Pragma_System_Name 136
#define Pragma_Task_Name 137 #define Pragma_Task_Info 137
#define Pragma_Task_Storage 138 #define Pragma_Task_Name 138
#define Pragma_Thread_Body 139 #define Pragma_Task_Storage 139
#define Pragma_Time_Slice 140 #define Pragma_Thread_Body 140
#define Pragma_Title 141 #define Pragma_Time_Slice 141
#define Pragma_Unchecked_Union 142 #define Pragma_Title 142
#define Pragma_Unimplemented_Unit 143 #define Pragma_Unchecked_Union 143
#define Pragma_Unreferenced 144 #define Pragma_Unimplemented_Unit 144
#define Pragma_Unreserve_All_Interrupts 145 #define Pragma_Unreferenced 145
#define Pragma_Volatile 146 #define Pragma_Unreferenced_Objects 146
#define Pragma_Volatile_Components 147 #define Pragma_Unreserve_All_Interrupts 147
#define Pragma_Weak_External 148 #define Pragma_Volatile 148
#define Pragma_AST_Entry 149 #define Pragma_Volatile_Components 149
#define Pragma_Interface 150 #define Pragma_Weak_External 150
#define Pragma_Priority 151 #define Pragma_AST_Entry 151
#define Pragma_Storage_Size 152 #define Pragma_Interface 152
#define Pragma_Storage_Unit 153 #define Pragma_Priority 153
#define Pragma_Storage_Size 154
#define Pragma_Storage_Unit 155
/* End of snames.h (C version of Snames package spec) */ /* End of snames.h (C version of Snames package spec) */
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Debug; use Debug; with Debug; use Debug;
with Lib; use Lib; with Lib; use Lib;
with Osint; use Osint; with Osint; use Osint;
...@@ -35,6 +33,8 @@ with Validsw; use Validsw; ...@@ -35,6 +33,8 @@ with Validsw; use Validsw;
with Sem_Warn; use Sem_Warn; with Sem_Warn; use Sem_Warn;
with Stylesw; use Stylesw; with Stylesw; use Stylesw;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with System.WCh_Con; use System.WCh_Con; with System.WCh_Con; use System.WCh_Con;
package body Switch.C is package body Switch.C is
...@@ -47,24 +47,29 @@ package body Switch.C is ...@@ -47,24 +47,29 @@ package body Switch.C is
----------------------------- -----------------------------
procedure Scan_Front_End_Switches (Switch_Chars : String) is procedure Scan_Front_End_Switches (Switch_Chars : String) is
Switch_Starts_With_Gnat : Boolean;
-- True if first four switch characters are "gnat"
First_Switch : Boolean := True; First_Switch : Boolean := True;
-- False for all but first switch -- False for all but first switch
Ptr : Integer := Switch_Chars'First; Max : constant Natural := Switch_Chars'Last;
Max : constant Integer := Switch_Chars'Last; Ptr : Natural;
C : Character := ' '; C : Character := ' ';
Dot : Boolean; Dot : Boolean;
Store_Switch : Boolean := True; Store_Switch : Boolean;
First_Char : Integer := Ptr; -- For -gnatxx switches, the normal processing, signalled by this flag
Storing : String := Switch_Chars; -- being set to True, is to store the switch on exit from the case
First_Stored : Positive := Ptr + 1; -- statement, the switch stored is -gnat followed by the characters
-- The above need comments ??? -- from First_Char to Ptr-1. For cases like -gnaty, where the switch
-- is stored in separate pieces, this flag is set to False, and the
-- appropriate calls to Store_Compilation_Switch are made from within
-- the case branch.
First_Char : Positive;
-- Marks start of switch to be stored
begin begin
Ptr := Switch_Chars'First;
-- Skip past the initial character (must be the switch character) -- Skip past the initial character (must be the switch character)
if Ptr = Max then if Ptr = Max then
...@@ -73,34 +78,15 @@ package body Switch.C is ...@@ -73,34 +78,15 @@ package body Switch.C is
Ptr := Ptr + 1; Ptr := Ptr + 1;
end if; end if;
-- Remove "gnat" from the switch, if present -- Handle switches that do not start with -gnat
Switch_Starts_With_Gnat :=
Ptr + 3 <= Max and then Switch_Chars (Ptr .. Ptr + 3) = "gnat";
if Switch_Starts_With_Gnat then
Ptr := Ptr + 4;
First_Stored := Ptr;
end if;
-- Loop to scan through switches given in switch string
while Ptr <= Max loop
Store_Switch := True;
First_Char := Ptr;
C := Switch_Chars (Ptr);
-- Processing for a switch
case Switch_Starts_With_Gnat is
when False =>
-- There are few front-end switches that if Ptr + 3 > Max
-- do not start with -gnat: -I, --RTS or else Switch_Chars (Ptr .. Ptr + 3) /= "gnat"
then
-- There are two front-end switches that do not start with -gnat:
-- -I, --RTS
if Switch_Chars (Ptr) = 'I' then if Switch_Chars (Ptr) = 'I' then
Store_Switch := False;
-- Set flag Search_Directory_Present if switch is "-I" only: -- Set flag Search_Directory_Present if switch is "-I" only:
-- the directory will be the next argument. -- the directory will be the next argument.
...@@ -114,17 +100,18 @@ package body Switch.C is ...@@ -114,17 +100,18 @@ package body Switch.C is
-- Find out whether this is a -I- or regular -Ixxx switch -- Find out whether this is a -I- or regular -Ixxx switch
-- Note: -I switches are not recorded in the ALI file, since the
-- meaning of the program depends on the source files compiled,
-- not where they came from.
if Ptr = Max and then Switch_Chars (Ptr) = '-' then if Ptr = Max and then Switch_Chars (Ptr) = '-' then
Look_In_Primary_Dir := False; Look_In_Primary_Dir := False;
else else
Add_Src_Search_Dir (Switch_Chars (Ptr .. Max)); Add_Src_Search_Dir (Switch_Chars (Ptr .. Max));
end if; end if;
Ptr := Max + 1;
-- Processing of the --RTS switch. --RTS has been modified by -- Processing of the --RTS switch. --RTS has been modified by
-- gcc and is now of the form -fRTS -- gcc and is now of the form -fRTS.
elsif Ptr + 3 <= Max elsif Ptr + 3 <= Max
and then Switch_Chars (Ptr .. Ptr + 3) = "fRTS" and then Switch_Chars (Ptr .. Ptr + 3) = "fRTS"
...@@ -136,9 +123,8 @@ package body Switch.C is ...@@ -136,9 +123,8 @@ package body Switch.C is
then then
Osint.Fail ("missing path for --RTS"); Osint.Fail ("missing path for --RTS");
else else
-- Check that this is the first time --RTS is specified -- Check that this is the first time --RTS is specified or if
-- or if it is not the first time, the same path has -- it is not the first time, the same path has been specified.
-- been specified.
if RTS_Specified = null then if RTS_Specified = null then
RTS_Specified := RTS_Specified :=
...@@ -156,20 +142,24 @@ package body Switch.C is ...@@ -156,20 +142,24 @@ package body Switch.C is
Opt.No_Stdinc := True; Opt.No_Stdinc := True;
Opt.RTS_Switch := True; Opt.RTS_Switch := True;
RTS_Src_Path_Name := Get_RTS_Search_Dir RTS_Src_Path_Name :=
(Switch_Chars (Ptr + 4 .. Max), Get_RTS_Search_Dir
Include); (Switch_Chars (Ptr + 4 .. Max), Include);
RTS_Lib_Path_Name := Get_RTS_Search_Dir
(Switch_Chars (Ptr + 4 .. Max), RTS_Lib_Path_Name :=
Objects); Get_RTS_Search_Dir
(Switch_Chars (Ptr + 4 .. Max), Objects);
if RTS_Src_Path_Name /= null and then if RTS_Src_Path_Name /= null
RTS_Lib_Path_Name /= null and then RTS_Lib_Path_Name /= null
then then
Ptr := Max + 1; -- Store the -fRTS switch (Note: Store_Compilation_Switch
-- changes -fRTS back into --RTS for the actual output).
elsif RTS_Src_Path_Name = null and then Store_Compilation_Switch (Switch_Chars);
RTS_Lib_Path_Name = null
elsif RTS_Src_Path_Name = null
and then RTS_Lib_Path_Name = null
then then
Osint.Fail ("RTS path not valid: missing " & Osint.Fail ("RTS path not valid: missing " &
"adainclude and adalib directories"); "adainclude and adalib directories");
...@@ -183,13 +173,25 @@ package body Switch.C is ...@@ -183,13 +173,25 @@ package body Switch.C is
"adalib directory"); "adalib directory");
end if; end if;
end if; end if;
-- There are no other switches not starting with -gnat
else else
Bad_Switch (C); Bad_Switch (C);
end if; end if;
when True => -- Case of switch starting with -gnat
else
Ptr := Ptr + 4;
-- Loop to scan through switches given in switch string
while Ptr <= Max loop
First_Char := Ptr;
Store_Switch := True;
-- Process -gnat* options C := Switch_Chars (Ptr);
case C is case C is
...@@ -229,7 +231,6 @@ package body Switch.C is ...@@ -229,7 +231,6 @@ package body Switch.C is
when 'd' => when 'd' =>
Store_Switch := False; Store_Switch := False;
Storing (First_Stored) := 'd';
Dot := False; Dot := False;
-- Note: for the debug switch, the remaining characters in this -- Note: for the debug switch, the remaining characters in this
...@@ -249,17 +250,10 @@ package body Switch.C is ...@@ -249,17 +250,10 @@ package body Switch.C is
then then
if Dot then if Dot then
Set_Dotted_Debug_Flag (C); Set_Dotted_Debug_Flag (C);
Storing (First_Stored + 1) := '.'; Store_Compilation_Switch ("-gnatd." & C);
Storing (First_Stored + 2) := C;
Store_Compilation_Switch
(Storing (Storing'First .. First_Stored + 2));
Dot := False;
else else
Set_Debug_Flag (C); Set_Debug_Flag (C);
Storing (First_Stored + 1) := C; Store_Compilation_Switch ("-gnatd" & C);
Store_Compilation_Switch
(Storing (Storing'First .. First_Stored + 1));
end if; end if;
elsif C = '.' then elsif C = '.' then
...@@ -349,7 +343,7 @@ package body Switch.C is ...@@ -349,7 +343,7 @@ package body Switch.C is
return; return;
-- -gnateD switch (symbol definition) -- -gnateD switch (preprocessing symbol definition)
when 'D' => when 'D' =>
Store_Switch := False; Store_Switch := False;
...@@ -363,13 +357,9 @@ package body Switch.C is ...@@ -363,13 +357,9 @@ package body Switch.C is
-- Store the switch -- Store the switch
Storing (First_Stored .. First_Stored + 1) := "eD"; Store_Compilation_Switch
Storing ("-gnateD" & Switch_Chars (Ptr .. Max));
(First_Stored + 2 .. First_Stored + Max - Ptr + 2) := Ptr := Max + 1;
Switch_Chars (Ptr .. Max);
Store_Compilation_Switch (Storing
(Storing'First .. First_Stored + Max - Ptr + 2));
return;
-- -gnatef (full source path for brief error messages) -- -gnatef (full source path for brief error messages)
...@@ -383,8 +373,7 @@ package body Switch.C is ...@@ -383,8 +373,7 @@ package body Switch.C is
when 'I' => when 'I' =>
Ptr := Ptr + 1; Ptr := Ptr + 1;
Scan_Pos Scan_Pos (Switch_Chars, Max, Ptr, Multiple_Unit_Index, C);
(Switch_Chars, Max, Ptr, Multiple_Unit_Index, C);
-- -gnatem (mapping file) -- -gnatem (mapping file)
...@@ -427,22 +416,12 @@ package body Switch.C is ...@@ -427,22 +416,12 @@ package body Switch.C is
Preprocessing_Data_File := Preprocessing_Data_File :=
new String'(Switch_Chars (Ptr .. Max)); new String'(Switch_Chars (Ptr .. Max));
-- Store the switch. -- Store the switch, normalizing to -gnatep=
-- Because we may store a longer switch (we normalize
-- to -gnatep=), use a local variable.
declare
To_Store : String
(1 .. Preprocessing_Data_File'Length + 8);
begin Store_Compilation_Switch
To_Store (1 .. 8) := "-gnatep="; ("-gnatep=" & Preprocessing_Data_File.all);
To_Store (9 .. Preprocessing_Data_File'Length + 8) :=
Preprocessing_Data_File.all;
Store_Compilation_Switch (To_Store);
end;
return; Ptr := Max + 1;
when 'z' => when 'z' =>
Store_Switch := False; Store_Switch := False;
...@@ -509,7 +488,7 @@ package body Switch.C is ...@@ -509,7 +488,7 @@ package body Switch.C is
Warn_On_Unchecked_Conversion := True; Warn_On_Unchecked_Conversion := True;
Warn_On_Unrecognized_Pragma := True; Warn_On_Unrecognized_Pragma := True;
Set_Style_Check_Options ("3abcdefhiklmnprstux"); Set_Style_Check_Options ("3aAbcdefhiklmnprstux");
-- Processing for G switch -- Processing for G switch
...@@ -680,10 +659,10 @@ package body Switch.C is ...@@ -680,10 +659,10 @@ package body Switch.C is
-- Processing for R switch -- Processing for R switch
when 'R' => when 'R' =>
Ptr := Ptr + 1;
Back_Annotate_Rep_Info := True; Back_Annotate_Rep_Info := True;
List_Representation_Info := 1; List_Representation_Info := 1;
Ptr := Ptr + 1;
while Ptr <= Max loop while Ptr <= Max loop
C := Switch_Chars (Ptr); C := Switch_Chars (Ptr);
...@@ -761,7 +740,6 @@ package body Switch.C is ...@@ -761,7 +740,6 @@ package body Switch.C is
when 'V' => when 'V' =>
Store_Switch := False; Store_Switch := False;
Storing (First_Stored) := 'V';
Ptr := Ptr + 1; Ptr := Ptr + 1;
if Ptr > Max then if Ptr > Max then
...@@ -780,10 +758,8 @@ package body Switch.C is ...@@ -780,10 +758,8 @@ package body Switch.C is
end if; end if;
for Index in First_Char + 1 .. Max loop for Index in First_Char + 1 .. Max loop
Storing (First_Stored + 1) :=
Switch_Chars (Index);
Store_Compilation_Switch Store_Compilation_Switch
(Storing (Storing'First .. First_Stored + 1)); ("-gnatV" & Switch_Chars (Index));
end loop; end loop;
end; end;
end if; end if;
...@@ -794,7 +770,6 @@ package body Switch.C is ...@@ -794,7 +770,6 @@ package body Switch.C is
when 'w' => when 'w' =>
Store_Switch := False; Store_Switch := False;
Storing (First_Stored) := 'w';
Ptr := Ptr + 1; Ptr := Ptr + 1;
if Ptr > Max then if Ptr > Max then
...@@ -804,16 +779,26 @@ package body Switch.C is ...@@ -804,16 +779,26 @@ package body Switch.C is
while Ptr <= Max loop while Ptr <= Max loop
C := Switch_Chars (Ptr); C := Switch_Chars (Ptr);
if Set_Warning_Switch (C) then -- Case of dot switch
null;
if C = '.' and then Ptr < Max then
Ptr := Ptr + 1;
C := Switch_Chars (Ptr);
if Set_Dot_Warning_Switch (C) then
Store_Compilation_Switch ("-gnatw." & C);
else else
Bad_Switch (C); Bad_Switch (C);
end if; end if;
if C /= 'w' then -- Normal case, no dot
Storing (First_Stored + 1) := C;
Store_Compilation_Switch else
(Storing (Storing'First .. First_Stored + 1)); if Set_Warning_Switch (C) then
Store_Compilation_Switch ("-gnatw" & C);
else
Bad_Switch (C);
end if;
end if; end if;
Ptr := Ptr + 1; Ptr := Ptr + 1;
...@@ -855,8 +840,6 @@ package body Switch.C is ...@@ -855,8 +840,6 @@ package body Switch.C is
when 'X' => when 'X' =>
Ptr := Ptr + 1; Ptr := Ptr + 1;
Extensions_Allowed := True; Extensions_Allowed := True;
Ada_Version := Ada_Version_Type'Last;
Ada_Version_Explicit := Ada_Version;
-- Processing for y switch -- Processing for y switch
...@@ -868,11 +851,9 @@ package body Switch.C is ...@@ -868,11 +851,9 @@ package body Switch.C is
else else
Store_Switch := False; Store_Switch := False;
Storing (First_Stored) := 'y';
declare declare
OK : Boolean; OK : Boolean;
Last_Stored : Integer;
begin begin
Set_Style_Check_Options Set_Style_Check_Options
...@@ -886,24 +867,22 @@ package body Switch.C is ...@@ -886,24 +867,22 @@ package body Switch.C is
Ptr := First_Char + 1; Ptr := First_Char + 1;
while Ptr <= Max loop while Ptr <= Max loop
Last_Stored := First_Stored + 1;
Storing (Last_Stored) := Switch_Chars (Ptr);
if Switch_Chars (Ptr) = 'M' then if Switch_Chars (Ptr) = 'M' then
First_Char := Ptr;
loop loop
Ptr := Ptr + 1; Ptr := Ptr + 1;
exit when Ptr > Max exit when Ptr > Max
or else Switch_Chars (Ptr) not in '0' .. '9'; or else Switch_Chars (Ptr) not in '0' .. '9';
Last_Stored := Last_Stored + 1;
Storing (Last_Stored) := Switch_Chars (Ptr);
end loop; end loop;
Store_Compilation_Switch
("-gnaty" & Switch_Chars (First_Char .. Ptr - 1));
else else
Store_Compilation_Switch
("-gnaty" & Switch_Chars (Ptr));
Ptr := Ptr + 1; Ptr := Ptr + 1;
end if; end if;
Store_Compilation_Switch
(Storing (Storing'First .. Last_Stored));
end loop; end loop;
end; end;
end if; end if;
...@@ -929,7 +908,6 @@ package body Switch.C is ...@@ -929,7 +908,6 @@ package body Switch.C is
end case; end case;
Ptr := Ptr + 1; Ptr := Ptr + 1;
end if; end if;
-- Processing for Z switch -- Processing for Z switch
...@@ -1000,17 +978,15 @@ package body Switch.C is ...@@ -1000,17 +978,15 @@ package body Switch.C is
when others => when others =>
Bad_Switch (C); Bad_Switch (C);
end case; end case;
end case;
if Store_Switch then if Store_Switch then
Storing (First_Stored .. First_Stored + Ptr - First_Char - 1) :=
Switch_Chars (First_Char .. Ptr - 1);
Store_Compilation_Switch Store_Compilation_Switch
(Storing (Storing'First .. First_Stored + Ptr - First_Char - 1)); ("-gnat" & Switch_Chars (First_Char .. Ptr - 1));
end if; end if;
First_Switch := False; First_Switch := False;
end loop; end loop;
end if;
end Scan_Front_End_Switches; end Scan_Front_End_Switches;
end Switch.C; end Switch.C;
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