diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/einfo.adb | 21 | ||||
-rw-r--r-- | gcc/ada/einfo.ads | 43 | ||||
-rw-r--r-- | gcc/ada/g-expect-vms.adb | 8 | ||||
-rw-r--r-- | gcc/ada/g-expect.adb | 9 | ||||
-rw-r--r-- | gcc/ada/par-prag.adb | 1 | ||||
-rw-r--r-- | gcc/ada/s-poosiz.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 49 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 16 | ||||
-rw-r--r-- | gcc/ada/sem_warn.adb | 239 | ||||
-rw-r--r-- | gcc/ada/snames.adb | 1 | ||||
-rw-r--r-- | gcc/ada/snames.ads | 974 | ||||
-rw-r--r-- | gcc/ada/snames.h | 25 |
12 files changed, 787 insertions, 601 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 3648741..d8be3e7 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -494,8 +494,8 @@ package body Einfo is -- Renamed_In_Spec Flag231 -- Implemented_By_Entry Flag232 + -- Has_Pragma_Unmodified Flag233 - -- (unused) Flag233 -- (unused) Flag234 -- (unused) Flag235 -- (unused) Flag236 @@ -1362,6 +1362,11 @@ package body Einfo is return Flag179 (Id); end Has_Pragma_Pure_Function; + function Has_Pragma_Unmodified (Id : E) return B is + begin + return Flag233 (Id); + end Has_Pragma_Unmodified; + function Has_Pragma_Unreferenced (Id : E) return B is begin return Flag180 (Id); @@ -3712,6 +3717,11 @@ package body Einfo is Set_Flag179 (Id, V); end Set_Has_Pragma_Pure_Function; + procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is + begin + Set_Flag233 (Id, V); + end Set_Has_Pragma_Unmodified; + procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is begin Set_Flag180 (Id, V); @@ -7275,6 +7285,7 @@ package body Einfo is W ("Has_Pragma_Preelab_Init", Flag221 (Id)); W ("Has_Pragma_Pure", Flag203 (Id)); W ("Has_Pragma_Pure_Function", Flag179 (Id)); + W ("Has_Pragma_Unmodified", Flag233 (Id)); W ("Has_Pragma_Unreferenced", Flag180 (Id)); W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id)); W ("Has_Primitive_Operations", Flag120 (Id)); @@ -8446,7 +8457,13 @@ package body Einfo is procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is begin - N := Next_Component (N); + N := Next_Entity (N); + while Present (N) loop + exit when Ekind (N) = E_Component + or else + Ekind (N) = E_Discriminant; + N := Next_Entity (N); + end loop; end Proc_Next_Component_Or_Discriminant; procedure Proc_Next_Discriminant (N : in out Node_Id) is diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 5b43e1f..6a98477 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -1532,6 +1532,8 @@ package Einfo is -- Present in E_Variable and E_Constant entities. Set if the entity is -- declared in a local procedure p and is accessed in a procedure nested -- inside p. Only set when VM_Target /= No_VM currently. +-- Why only set it under those conditions, sounds reasonable to always +-- set this flag when appropriate ??? -- Has_Nested_Block_With_Handler (Flag101) -- Present in scope entities. Set if there is a nested block within the @@ -1619,9 +1621,15 @@ package Einfo is -- Pure_Function was given for the entity. In some cases, we need to -- know that Is_Pure was explicitly set using this pragma. +-- Has_Pragma_Unmodified (Flag233) +-- Present in all entities. Can only be set for variables (E_Variable, +-- E_Out_Parameter, E_In_Out_Parameter). Set if a valid pragma Unmodified +-- applies to the variable, indicating that no warning should be given +-- if the entity is never modified. + -- Has_Pragma_Unreferenced (Flag180) -- Present in all entities. Set if a valid pragma Unreferenced applies --- to the pragma, indicating that no warning should be given if the +-- to the entity, indicating that no warning should be given if the -- entity has no references, but a warning should be given if it is -- in fact referenced. For private types, this flag is set in both the -- private entity and full entity if the pragma applies to either. @@ -2402,8 +2410,8 @@ package Einfo is -- extended Import pragmas. Can only be set for OpenVMS versions of GNAT. -- Is_Ordinary_Fixed_Point_Type (synthesized) --- Applies to all entities, true for ordinary fixed point types --- and subtypes +-- Applies to all entities, true for ordinary fixed point types and +-- subtypes. -- Is_Overriding_Operation (Flag39) -- Present in subprograms. Set if the subprogram is a primitive @@ -2479,8 +2487,8 @@ package Einfo is -- Is_Primitive (Flag218) -- Present in overloadable entities and in generic subprograms. Set to --- indicate that this is a primitive operation of some type, which may be --- a tagged type or a non-tagged type. Used to verify overriding +-- indicate that this is a primitive operation of some type, which may +-- be a tagged type or a non-tagged type. Used to verify overriding -- indicators in bodies. -- Is_Primitive_Wrapper (Flag195) @@ -2650,14 +2658,14 @@ package Einfo is -- associated with accessibility level. -- Is_True_Constant (Flag163) --- This flag applies to all entities for constants and variables. Set --- in constants and variables which have an initial value specified but --- which are never assigned, partially or in the whole. For variables, it --- means that the variable was initialized but never modified, and hence --- can be treated as a constant by the code generator. For a constant, it --- means that the constant was not modified by generated code (e.g. to --- set a discriminant in an init proc). Assignments by user or generated --- code will reset this flag. +-- Present in all entities for constants and variables. Set in constants +-- and variables which have an initial value specified but which are +-- never assigned, partially or in the whole. For variables, it means +-- that the variable was initialized but never modified, and hence can be +-- treated as a constant by the code generator. For a constant, it means +-- that the constant was not modified by generated code (e.g. to set a +-- discriminant in an init proc). Assignments by user or generated code +-- will reset this flag. -- -- Note: there is one situation in which the back end does not permit -- this flag to be set, even if no assignments are generated. This is @@ -3378,7 +3386,7 @@ package Einfo is -- the Scope will be the parent package, and for a non-child package, -- the Scope will be Standard. --- Scope_Depth (synth) +-- Scope_Depth (synthesized) -- Applies to program units, blocks, concurrent types and entries, -- and also to record types, i.e. to any entity that can appear on -- the scope stack. Yields the scope depth value, which for those @@ -4473,6 +4481,7 @@ package Einfo is -- Has_Pragma_Pack (Flag121) (base type only) -- Has_Pragma_Pure (Flag203) -- Has_Pragma_Pure_Function (Flag179) + -- Has_Pragma_Unmodified (Flag233) -- Has_Pragma_Unreferenced (Flag180) -- Has_Private_Declaration (Flag155) -- Has_Qualified_Name (Flag161) @@ -5781,6 +5790,7 @@ package Einfo is function Has_Pragma_Preelab_Init (Id : E) return B; function Has_Pragma_Pure (Id : E) return B; function Has_Pragma_Pure_Function (Id : E) return B; + function Has_Pragma_Unmodified (Id : E) return B; function Has_Pragma_Unreferenced (Id : E) return B; function Has_Pragma_Unreferenced_Objects (Id : E) return B; function Has_Primitive_Operations (Id : E) return B; @@ -6322,6 +6332,7 @@ package Einfo is procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True); procedure Set_Has_Pragma_Pure (Id : E; V : B := True); procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True); + procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True); procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True); procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True); procedure Set_Has_Primitive_Operations (Id : E; V : B := True); @@ -6644,7 +6655,7 @@ package Einfo is renames Proc_Next_Component; procedure Next_Component_Or_Discriminant (N : in out Node_Id) - renames Proc_Next_Component; + renames Proc_Next_Component_Or_Discriminant; procedure Next_Discriminant (N : in out Node_Id) renames Proc_Next_Discriminant; @@ -6931,6 +6942,7 @@ package Einfo is pragma Inline (Has_Pragma_Preelab_Init); pragma Inline (Has_Pragma_Pure); pragma Inline (Has_Pragma_Pure_Function); + pragma Inline (Has_Pragma_Unmodified); pragma Inline (Has_Pragma_Unreferenced); pragma Inline (Has_Pragma_Unreferenced_Objects); pragma Inline (Has_Primitive_Operations); @@ -7343,6 +7355,7 @@ package Einfo is pragma Inline (Set_Has_Pragma_Preelab_Init); pragma Inline (Set_Has_Pragma_Pure); pragma Inline (Set_Has_Pragma_Pure_Function); + pragma Inline (Set_Has_Pragma_Unmodified); pragma Inline (Set_Has_Pragma_Unreferenced); pragma Inline (Set_Has_Pragma_Unreferenced_Objects); pragma Inline (Set_Has_Primitive_Operations); diff --git a/gcc/ada/g-expect-vms.adb b/gcc/ada/g-expect-vms.adb index c4c4419..d3d9eb6 100644 --- a/gcc/ada/g-expect-vms.adb +++ b/gcc/ada/g-expect-vms.adb @@ -1082,6 +1082,9 @@ package body GNAT.Expect is Args : System.Address) is pragma Warnings (Off, Pid); + pragma Warnings (Off, Pipe1); + pragma Warnings (Off, Pipe2); + pragma Warnings (Off, Pipe3); begin -- Since the code between fork and exec on VMS executes @@ -1099,6 +1102,7 @@ package body GNAT.Expect is -- Since we are still called from the parent process, there is no way -- currently we can cleanly close the unneeded ends of the pipes, but -- this doesn't really matter. + -- We could close Pipe1.Output, Pipe2.Input, Pipe3.Input. Dup2 (Pipe1.Input, GNAT.OS_Lib.Standin); @@ -1106,7 +1110,6 @@ package body GNAT.Expect is Dup2 (Pipe3.Output, GNAT.OS_Lib.Standerr); Portable_Execvp (Pid.Pid'Access, Cmd & ASCII.Nul, Args); - end Set_Up_Child_Communications; --------------------------- @@ -1156,6 +1159,9 @@ package body GNAT.Expect is Pipe3 : in out Pipe_Type) is pragma Warnings (Off, Pid); + pragma Warnings (Off, Pipe1); + pragma Warnings (Off, Pipe2); + pragma Warnings (Off, Pipe3); begin diff --git a/gcc/ada/g-expect.adb b/gcc/ada/g-expect.adb index 237f3f4..99e6f63 100644 --- a/gcc/ada/g-expect.adb +++ b/gcc/ada/g-expect.adb @@ -1190,6 +1190,9 @@ package body GNAT.Expect is Args : System.Address) is pragma Warnings (Off, Pid); + pragma Warnings (Off, Pipe1); + pragma Warnings (Off, Pipe2); + pragma Warnings (Off, Pipe3); Input : File_Descriptor; Output : File_Descriptor; @@ -1210,7 +1213,8 @@ package body GNAT.Expect is -- Since we are still called from the parent process, there is no way -- currently we can cleanly close the unneeded ends of the pipes, but -- this doesn't really matter. - -- We could close Pipe1.Output, Pipe2.Input, Pipe3.Input. + + -- We could close Pipe1.Output, Pipe2.Input, Pipe3.Input Dup2 (Pipe1.Input, GNAT.OS_Lib.Standin); Dup2 (Pipe2.Output, GNAT.OS_Lib.Standout); @@ -1298,6 +1302,9 @@ package body GNAT.Expect is Pipe3 : in out Pipe_Type) is pragma Warnings (Off, Pid); + pragma Warnings (Off, Pipe1); + pragma Warnings (Off, Pipe2); + pragma Warnings (Off, Pipe3); begin Close (Pipe1.Input); Close (Pipe2.Output); diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 2114fd9..5f49f9f 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -1181,6 +1181,7 @@ begin Pragma_Unimplemented_Unit | Pragma_Universal_Aliasing | Pragma_Universal_Data | + Pragma_Unmodified | Pragma_Unreferenced | Pragma_Unreferenced_Objects | Pragma_Unreserve_All_Interrupts | diff --git a/gcc/ada/s-poosiz.adb b/gcc/ada/s-poosiz.adb index 22d4a3d..a86f1d1 100644 --- a/gcc/ada/s-poosiz.adb +++ b/gcc/ada/s-poosiz.adb @@ -301,6 +301,8 @@ package body System.Pool_Size is Storage_Size : SSE.Storage_Count; Alignment : SSE.Storage_Count) is + pragma Warnings (Off, Pool); + Align_Size : constant SSE.Storage_Count := ((Storage_Size + Alignment - 1) / Alignment) * Alignment; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 7432a3b..f0f31cb 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -10755,6 +10755,54 @@ package body Sem_Prag is Error_Pragma ("?pragma% ignored (applies only to AAMP)"); end if; + ---------------- + -- Unmodified -- + ---------------- + + -- pragma Unmodified (local_Name {, local_Name}); + + when Pragma_Unmodified => Unmodified : declare + Arg_Node : Node_Id; + Arg_Expr : Node_Id; + Arg_Ent : Entity_Id; + + begin + GNAT_Pragma; + Check_At_Least_N_Arguments (1); + + -- Loop through arguments + + Arg_Node := Arg1; + while Present (Arg_Node) loop + Check_No_Identifier (Arg_Node); + + -- Note: the analyze call done by Check_Arg_Is_Local_Name + -- will in fact generate reference, so that the entity will + -- have a reference, which will inhibit any warnings about + -- it not being referenced, and also properly show up in the + -- ali file as a reference. But this reference is recorded + -- before the Has_Pragma_Unreferenced flag is set, so that + -- no warning is generated for this reference. + + Check_Arg_Is_Local_Name (Arg_Node); + Arg_Expr := Get_Pragma_Arg (Arg_Node); + + if Is_Entity_Name (Arg_Expr) then + Arg_Ent := Entity (Arg_Expr); + + if not Is_Assignable (Arg_Ent) then + Error_Pragma_Arg + ("pragma% can only be applied to a variable", + Arg_Expr); + else + Set_Has_Pragma_Unmodified (Arg_Ent); + end if; + end if; + + Next (Arg_Node); + end loop; + end Unmodified; + ------------------ -- Unreferenced -- ------------------ @@ -11501,6 +11549,7 @@ package body Sem_Prag is Pragma_Unimplemented_Unit => -1, Pragma_Universal_Aliasing => -1, Pragma_Universal_Data => -1, + Pragma_Unmodified => -1, Pragma_Unreferenced => -1, Pragma_Unreferenced_Objects => -1, Pragma_Unreserve_All_Interrupts => -1, diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index e38d5ab..344122a 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -7398,7 +7398,9 @@ package body Sem_Util is ----------------------- procedure Mark_Coextensions (Context_Nod : Node_Id; Root_Nod : Node_Id) is - Is_Dynamic : Boolean := False; + Is_Dynamic : Boolean; + -- Indicates whether the context causes nested coextensions to be + -- dynamic or static function Mark_Allocator (N : Node_Id) return Traverse_Result; -- Recognize an allocator node and label it as a dynamic coextension @@ -7932,6 +7934,10 @@ package body Sem_Util is if Comes_From_Source (Exp) or else Modification_Comes_From_Source then + if Has_Pragma_Unmodified (Ent) then + Error_Msg_NE ("?pragma Unmodified given for &!", N, Ent); + end if; + Set_Never_Set_In_Source (Ent, False); end if; @@ -8565,16 +8571,12 @@ package body Sem_Util is return OK; end Clear_Analyzed; - function Reset_Analyzed is - new Traverse_Func (Clear_Analyzed); - - Discard : Traverse_Result; - pragma Warnings (Off, Discard); + procedure Reset_Analyzed is new Traverse_Proc (Clear_Analyzed); -- Start of processing for Reset_Analyzed_Flags begin - Discard := Reset_Analyzed (N); + Reset_Analyzed (N); end Reset_Analyzed_Flags; --------------------------- diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index 6621d66..46a6954 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -61,6 +61,16 @@ package body Sem_Warn is Table_Increment => Alloc.Unreferenced_Entities_Increment, Table_Name => "Unreferenced_Entities"); + -- The following table collects potential warnings for IN OUT parameters + -- that are referenced but not modified. These warnings are processed when + -- the front end calls the procedure Output_Non_Modifed_In_Out_Warnings. + -- The reason that we defer output of these messages is that we want to + -- detect the case where the relevant procedure is used as a generic actual + -- in an instantation, since we suppress the warnings in this case. The + -- flag Used_As_Generic_Actual will be set in this case, but will not be + -- set till later. Similarly, we suppress the message if the address of + -- the procedure is taken, where the flag Address_Taken may be set later. + package In_Out_Warnings is new Table.Table ( Table_Component_Type => Entity_Id, Table_Index_Type => Nat, @@ -84,6 +94,12 @@ package body Sem_Warn is -- If E is a parameter entity for a subprogram body, then this function -- returns the corresponding spec entity, if not, E is returned unchanged. + function Has_Pragma_Unmodified_Check_Spec (E : Entity_Id) return Boolean; + -- Tests Has_Pragma_Unmodified flag for entity E. If E is not a formal, + -- this is simply the setting of the flag Has_Pragma_Unmodified. If E is + -- a body formal, the setting of the flag in the corresponding spec is + -- also checked (and True returned if either flag is True). + function Has_Pragma_Unreferenced_Check_Spec (E : Entity_Id) return Boolean; -- Tests Has_Pragma_Unreferenced flag for entity E. If E is not a formal, -- this is simply the setting of the flag Has_Pragma_Unreferenced. If E is @@ -551,8 +567,9 @@ package body Sem_Warn is ---------------------- procedure Check_References (E : Entity_Id; Anod : Node_Id := Empty) is - E1 : Entity_Id; - UR : Node_Id; + E1 : Entity_Id; + E1T : Entity_Id; + UR : Node_Id; function Body_Formal (E : Entity_Id; @@ -653,6 +670,12 @@ package body Sem_Warn is procedure Output_Reference_Error (M : String) is begin + -- Never issue messages for internal names + + if Is_Internal_Name (Chars (E1)) then + return; + end if; + -- Don't output message for IN OUT formal unless we have the warning -- flag specifically set. It is a bit odd to distinguish IN OUT -- formals from other cases. This distinction is historical in @@ -792,14 +815,18 @@ package body Sem_Warn is E1 := First_Entity (E); while Present (E1) loop + E1T := Etype (E1); -- We only look at source entities with warning flag on. We also -- ignore objects whose type or base type has warnings suppressed. + -- We also don't issue warnings within instances, since the proper + -- place for such warnings is on the template when it is compiled. if Comes_From_Source (E1) and then not Warnings_Off (E1) - and then not Warnings_Off (Etype (E1)) - and then not Warnings_Off (Base_Type (Etype (E1))) + and then not Warnings_Off (E1T) + and then not Warnings_Off (Base_Type (E1T)) + and then Instantiation_Location (Sloc (E1)) = No_Location then -- We are interested in variables and out/in-out parameters, but -- we exclude protected types, too complicated to worry about. @@ -832,8 +859,10 @@ package body Sem_Warn is then null; + -- Special processing for access types + elsif Present (UR) - and then Is_Access_Type (Etype (E1)) + and then Is_Access_Type (E1T) then -- For access types, the only time we made a UR entry was -- for a dereference, and so we post the appropriate warning @@ -852,10 +881,8 @@ package body Sem_Warn is -- the package. elsif Warn_On_Constant - and then ((Ekind (E1) = E_Variable - and then Has_Initial_Value (E1)) - or else - Ekind (E1) = E_In_Out_Parameter) + and then (Ekind (E1) = E_Variable + and then Has_Initial_Value (E1)) and then Never_Set_In_Source_Check_Spec (E1) and then not Address_Taken (E1) and then not Generic_Package_Spec_Entity (E1) @@ -875,73 +902,29 @@ package body Sem_Warn is -- the case of exception choice (and a bit more too, but not -- worth doing more investigation here). - elsif Is_RTE (Etype (E1), RE_Exception_Occurrence) then + elsif Is_RTE (E1T, RE_Exception_Occurrence) then null; -- Here we give the warning if referenced and no pragma - -- Unreferenced is present. + -- Unreferenced or Unmodified is present. else + -- Variable case + if Ekind (E1) = E_Variable then if Referenced_Check_Spec (E1) and then not Has_Pragma_Unreferenced_Check_Spec (E1) + and then not Has_Pragma_Unmodified_Check_Spec (E1) then Error_Msg_N ("?& is not modified, " & "could be declared constant!", E1); end if; - - else pragma Assert (Ekind (E1) = E_In_Out_Parameter); - if Referenced_Check_Spec (E1) - and then - not Has_Pragma_Unreferenced_Check_Spec (E1) - then - -- Suppress warning if private type, since in this - -- case it may be quite reasonable for the logical - -- view to be in out, even if the implementation - -- ends up using access types. - - if Has_Private_Declaration (Etype (E1)) then - null; - - -- Suppress warning for any composite type, since - -- for composites it seems quite reasonable to pass - -- a value of the composite type and then modify - -- just a component. - - elsif Is_Composite_Type (Etype (E1)) then - null; - - -- Suppress warning for parameter of dispatching - -- operation, since it is quite reasonable to have - -- an operation that is overridden, and for some - -- subclasses needs to be IN OUT and for others - -- the parameter does not happen to be assigned. - - elsif Is_Dispatching_Operation - (Scope (Goto_Spec_Entity (E1))) - then - null; - - -- OK, looks like warning for an IN OUT parameter - -- that could be IN makes sense, but we delay the - -- output of the warning, pending possibly finding - -- out later on that the associated subprogram is - -- used as a generic actual, or its address/access - -- is taken. In these two cases, we suppress the - -- warning because the context may force use of IN - -- OUT, even if in this particular case the formal - -- is not modifed. - - else - In_Out_Warnings.Append (E1); - end if; - end if; end if; end if; - -- Other cases of a variable never set in source + -- Other cases of a variable or parameter never set in source elsif Never_Set_In_Source_Check_Spec (E1) @@ -971,9 +954,9 @@ package body Sem_Warn is -- never referenced, since again it seems odd to rely on -- default initialization to set an out parameter value. - and then (Is_Access_Type (Etype (E1)) + and then (Is_Access_Type (E1T) or else Ekind (E1) = E_Out_Parameter - or else not Is_Fully_Initialized_Type (Etype (E1))) + or else not Is_Fully_Initialized_Type (E1T)) then -- Do not output complaint about never being assigned a -- value if a pragma Unreferenced applies to the variable @@ -981,16 +964,79 @@ package body Sem_Warn is -- a pragma Unreferenced for the corresponding spec. if Has_Pragma_Unreferenced_Check_Spec (E1) - or else Has_Pragma_Unreferenced_Objects (Etype (E1)) + or else Has_Pragma_Unreferenced_Objects (E1T) then null; - -- Case of unreferenced formal + -- IN OUT parameter case where parameter is referenced. We + -- separate this out, since this is the case where we delay + -- output of the warning until more information is available + -- (about use in an instantiation or address being taken). + + elsif Ekind (E1) = E_In_Out_Parameter + and then Referenced_Check_Spec (E1) + then + -- Suppress warning if private type, and the procedure + -- has a separate declaration in a different unit. This + -- is the case where the client of a package sees only + -- the private type, and it it may be quite reasonable + -- for the logical view to be in out, even if the + -- implementation ends up using access types or some + -- other method to achieve the local effect of a + -- modification. On the other hand if the spec and body + -- are in the same unit, we are in the package body and + -- there we less excuse for a junk IN OUT parameter. + + if Has_Private_Declaration (E1T) + and then Present (Spec_Entity (E1)) + and then not In_Same_Source_Unit (E1, Spec_Entity (E1)) + then + null; + + -- Suppress warning for any parameter of a dispatching + -- operation, since it is quite reasonable to have an + -- operation that is overridden, and for some subclasses + -- needs to be IN OUT and for others the parameter does + -- not happen to be assigned. + + elsif Is_Dispatching_Operation + (Scope (Goto_Spec_Entity (E1))) + then + null; + + -- Suppress warning if composite type containing any + -- access element component, since the logical effect + -- of modifying a parameter may be achieved by modifying + -- a referenced entity. + + elsif Is_Composite_Type (E1T) + and then Has_Access_Values (E1T) + then + null; + + -- OK, looks like warning for an IN OUT parameter that + -- could be IN makes sense, but we delay the output of + -- the warning, pending possibly finding out later on + -- that the associated subprogram is used as a generic + -- actual, or its address/access is taken. In these two + -- cases, we suppress the warning because the context may + -- force use of IN OUT, even if in this particular case + -- the formal is not modifed. + + else + In_Out_Warnings.Append (E1); + end if; + + -- Other cases of formals elsif Is_Formal (E1) then if Referenced_Check_Spec (E1) then - Output_Reference_Error - ("?formal parameter& is read but never assigned!"); + if not Has_Pragma_Unmodified_Check_Spec (E1) then + Output_Reference_Error + ("?formal parameter& is read but " + & "never assigned!"); + end if; + else Output_Reference_Error ("?formal parameter& is not referenced!"); @@ -1054,7 +1100,9 @@ package body Sem_Warn is -- are only for functions, and functions do not allow OUT -- parameters.) - if Nkind (UR) = N_Simple_Return_Statement then + if Nkind (UR) = N_Simple_Return_Statement + and then not Has_Pragma_Unmodified_Check_Spec (E1) + then Error_Msg_NE ("?OUT parameter& not set before return", UR, E1); @@ -1073,7 +1121,7 @@ package body Sem_Warn is Comp : Entity_Id; begin - Comp := First_Entity (Etype (E1)); + Comp := First_Entity (E1T); while Present (Comp) loop if Ekind (Comp) = E_Component and then Nkind (Parent (Comp)) = @@ -1235,7 +1283,7 @@ package body Sem_Warn is and then ((Ekind (E1) /= E_Variable and then Ekind (E1) /= E_Constant and then Ekind (E1) /= E_Component) - or else not Is_Task_Type (Etype (E1))) + or else not Is_Task_Type (E1T)) -- For subunits, only place warnings on the main unit itself, -- since parent units are not completely compiled @@ -2219,6 +2267,23 @@ package body Sem_Warn is end if; end Goto_Spec_Entity; + -------------------------------------- + -- Has_Pragma_Unmodified_Check_Spec -- + -------------------------------------- + + function Has_Pragma_Unmodified_Check_Spec + (E : Entity_Id) return Boolean + is + begin + if Is_Formal (E) and then Present (Spec_Entity (E)) then + return Has_Pragma_Unmodified (E) + or else + Has_Pragma_Unmodified (Spec_Entity (E)); + else + return Has_Pragma_Unmodified (E); + end if; + end Has_Pragma_Unmodified_Check_Spec; + ---------------------------------------- -- Has_Pragma_Unreferenced_Check_Spec -- ---------------------------------------- @@ -2344,16 +2409,31 @@ package body Sem_Warn is begin -- Suppress warning in specific cases (see details in comments for - -- No_Warn_On_In_Out). + -- No_Warn_On_In_Out), or if there is a pragma Unmodified. - if No_Warn_On_In_Out (E1) then + if No_Warn_On_In_Out (E1) + or else Has_Pragma_Unmodified_Check_Spec (E1) + then null; -- Here we generate the warning else - Error_Msg_N ("?formal parameter & is not modified!", E1); - Error_Msg_N ("\?mode could be IN instead of `IN OUT`!", E1); + -- If -gnatwc is set then output message that we could be IN + + if Warn_On_Constant then + Error_Msg_N ("?formal parameter & is not modified!", E1); + Error_Msg_N ("\?mode could be IN instead of `IN OUT`!", E1); + + -- We do not generate warnings for IN OUT parameters unless we + -- have at least -gnatwu. This is deliberately inconsistent + -- with the treatment of variables, but otherwise we get too + -- many unexpected warnings in default mode. + + elsif Check_Unreferenced then + Error_Msg_N ("?formal parameter& is read but " + & "never assigned!", E1); + end if; -- Kill any other warnings on this entity, since this is the -- one that should dominate any other unreferenced warning. @@ -3349,10 +3429,12 @@ package body Sem_Warn is and then not Is_Return_Object (E) and then not Is_Aliased (E) and then No (Renamed_Object (E)) - then - Error_Msg_N - ("?variable & is assigned but never read!", E); + if not Has_Pragma_Unmodified_Check_Spec (E) then + Error_Msg_N + ("?variable & is assigned but never read!", E); + end if; + Set_Last_Assignment (E, Empty); end if; @@ -3532,9 +3614,12 @@ package body Sem_Warn is if No (N) then -- Don't give this for OUT and IN OUT formals, since - -- clearly caller may reference the assigned value. + -- clearly caller may reference the assigned value. Also + -- never give such warnings for internal variables. - if Ekind (Ent) = E_Variable then + if Ekind (Ent) = E_Variable + and then not Is_Internal_Name (Chars (Ent)) + then if Referenced_As_Out_Parameter (Ent) then Error_Msg_NE ("?& modified by call, but value never referenced", diff --git a/gcc/ada/snames.adb b/gcc/ada/snames.adb index b02f764..6b3e9ee 100644 --- a/gcc/ada/snames.adb +++ b/gcc/ada/snames.adb @@ -326,6 +326,7 @@ package body Snames is "unchecked_union#" & "unimplemented_unit#" & "universal_aliasing#" & + "unmodified#" & "unreferenced#" & "unreferenced_objects#" & "unreserve_all_interrupts#" & diff --git a/gcc/ada/snames.ads b/gcc/ada/snames.ads index 494e79f..2b4d47b 100644 --- a/gcc/ada/snames.ads +++ b/gcc/ada/snames.ads @@ -519,13 +519,14 @@ package Snames is Name_Unchecked_Union : constant Name_Id := N + 265; -- GNAT Name_Unimplemented_Unit : constant Name_Id := N + 266; -- GNAT Name_Universal_Aliasing : constant Name_Id := N + 267; -- GNAT - Name_Unreferenced : constant Name_Id := N + 268; -- GNAT - Name_Unreferenced_Objects : constant Name_Id := N + 269; -- GNAT - Name_Unreserve_All_Interrupts : constant Name_Id := N + 270; -- GNAT - Name_Volatile : constant Name_Id := N + 271; - Name_Volatile_Components : constant Name_Id := N + 272; - Name_Weak_External : constant Name_Id := N + 273; -- GNAT - Last_Pragma_Name : constant Name_Id := N + 273; + Name_Unmodified : constant Name_Id := N + 268; -- GNAT + Name_Unreferenced : constant Name_Id := N + 269; -- GNAT + Name_Unreferenced_Objects : constant Name_Id := N + 270; -- GNAT + Name_Unreserve_All_Interrupts : constant Name_Id := N + 271; -- GNAT + Name_Volatile : constant Name_Id := N + 272; + Name_Volatile_Components : constant Name_Id := N + 273; + Name_Weak_External : constant Name_Id := N + 274; -- GNAT + Last_Pragma_Name : constant Name_Id := N + 274; -- Language convention names for pragma Convention/Export/Import/Interface -- Note that Name_C is not included in this list, since it was already @@ -536,119 +537,119 @@ package Snames is -- Entry and Protected, this is because these conventions cannot be -- specified by a pragma. - First_Convention_Name : constant Name_Id := N + 274; - Name_Ada : constant Name_Id := N + 274; - Name_Assembler : constant Name_Id := N + 275; - Name_CIL : constant Name_Id := N + 276; - Name_COBOL : constant Name_Id := N + 277; - Name_CPP : constant Name_Id := N + 278; - Name_Fortran : constant Name_Id := N + 279; - Name_Intrinsic : constant Name_Id := N + 280; - Name_Java : constant Name_Id := N + 281; - Name_Stdcall : constant Name_Id := N + 282; - Name_Stubbed : constant Name_Id := N + 283; - Last_Convention_Name : constant Name_Id := N + 283; + First_Convention_Name : constant Name_Id := N + 275; + Name_Ada : constant Name_Id := N + 275; + Name_Assembler : constant Name_Id := N + 276; + Name_CIL : constant Name_Id := N + 277; + Name_COBOL : constant Name_Id := N + 278; + Name_CPP : constant Name_Id := N + 279; + Name_Fortran : constant Name_Id := N + 280; + Name_Intrinsic : constant Name_Id := N + 281; + Name_Java : constant Name_Id := N + 282; + Name_Stdcall : constant Name_Id := N + 283; + Name_Stubbed : constant Name_Id := N + 284; + Last_Convention_Name : constant Name_Id := N + 284; -- The following names are preset as synonyms for Assembler - Name_Asm : constant Name_Id := N + 284; - Name_Assembly : constant Name_Id := N + 285; + Name_Asm : constant Name_Id := N + 285; + Name_Assembly : constant Name_Id := N + 286; -- The following names are preset as synonyms for C - Name_Default : constant Name_Id := N + 286; + Name_Default : constant Name_Id := N + 287; -- Name_Exernal (previously defined as pragma) -- The following names are preset as synonyms for CPP - Name_C_Plus_Plus : constant Name_Id := N + 287; + Name_C_Plus_Plus : constant Name_Id := N + 288; -- The following names are present as synonyms for Stdcall - Name_DLL : constant Name_Id := N + 288; - Name_Win32 : constant Name_Id := N + 289; + Name_DLL : constant Name_Id := N + 289; + Name_Win32 : constant Name_Id := N + 290; -- Other special names used in processing pragmas - Name_As_Is : constant Name_Id := N + 290; - Name_Attribute_Name : constant Name_Id := N + 291; - Name_Body_File_Name : constant Name_Id := N + 292; - Name_Boolean_Entry_Barriers : constant Name_Id := N + 293; - Name_Check : constant Name_Id := N + 294; - Name_Casing : constant Name_Id := N + 295; - Name_Code : constant Name_Id := N + 296; - Name_Component : constant Name_Id := N + 297; - Name_Component_Size_4 : constant Name_Id := N + 298; - Name_Copy : constant Name_Id := N + 299; - Name_D_Float : constant Name_Id := N + 300; - Name_Descriptor : constant Name_Id := N + 301; - Name_Dot_Replacement : constant Name_Id := N + 302; - Name_Dynamic : constant Name_Id := N + 303; - Name_Entity : constant Name_Id := N + 304; - Name_Entry_Count : constant Name_Id := N + 305; - Name_External_Name : constant Name_Id := N + 306; - Name_First_Optional_Parameter : constant Name_Id := N + 307; - Name_Form : constant Name_Id := N + 308; - Name_G_Float : constant Name_Id := N + 309; - Name_Gcc : constant Name_Id := N + 310; - Name_Gnat : constant Name_Id := N + 311; - Name_GPL : constant Name_Id := N + 312; - Name_IEEE_Float : constant Name_Id := N + 313; - Name_Ignore : constant Name_Id := N + 314; - Name_Info : constant Name_Id := N + 315; - Name_Internal : constant Name_Id := N + 316; - Name_Link_Name : constant Name_Id := N + 317; - Name_Lowercase : constant Name_Id := N + 318; - Name_Max_Entry_Queue_Depth : constant Name_Id := N + 319; - Name_Max_Entry_Queue_Length : constant Name_Id := N + 320; - Name_Max_Size : constant Name_Id := N + 321; - Name_Mechanism : constant Name_Id := N + 322; - Name_Message : constant Name_Id := N + 323; - Name_Mixedcase : constant Name_Id := N + 324; - Name_Modified_GPL : constant Name_Id := N + 325; - Name_Name : constant Name_Id := N + 326; - Name_NCA : constant Name_Id := N + 327; - Name_No : constant Name_Id := N + 328; - Name_No_Dependence : constant Name_Id := N + 329; - Name_No_Dynamic_Attachment : constant Name_Id := N + 330; - Name_No_Dynamic_Interrupts : constant Name_Id := N + 331; - Name_No_Requeue : constant Name_Id := N + 332; - Name_No_Requeue_Statements : constant Name_Id := N + 333; - Name_No_Task_Attributes : constant Name_Id := N + 334; - Name_No_Task_Attributes_Package : constant Name_Id := N + 335; - Name_On : constant Name_Id := N + 336; - Name_Parameter_Types : constant Name_Id := N + 337; - Name_Reference : constant Name_Id := N + 338; - Name_Restricted : constant Name_Id := N + 339; - Name_Result_Mechanism : constant Name_Id := N + 340; - Name_Result_Type : constant Name_Id := N + 341; - Name_Runtime : constant Name_Id := N + 342; - Name_SB : constant Name_Id := N + 343; - Name_Secondary_Stack_Size : constant Name_Id := N + 344; - Name_Section : constant Name_Id := N + 345; - Name_Semaphore : constant Name_Id := N + 346; - Name_Simple_Barriers : constant Name_Id := N + 347; - Name_Spec_File_Name : constant Name_Id := N + 348; - Name_State : constant Name_Id := N + 349; - Name_Static : constant Name_Id := N + 350; - Name_Stack_Size : constant Name_Id := N + 351; - Name_Subunit_File_Name : constant Name_Id := N + 352; - Name_Task_Stack_Size_Default : constant Name_Id := N + 353; - Name_Task_Type : constant Name_Id := N + 354; - Name_Time_Slicing_Enabled : constant Name_Id := N + 355; - Name_Top_Guard : constant Name_Id := N + 356; - Name_UBA : constant Name_Id := N + 357; - Name_UBS : constant Name_Id := N + 358; - Name_UBSB : constant Name_Id := N + 359; - Name_Unit_Name : constant Name_Id := N + 360; - Name_Unknown : constant Name_Id := N + 361; - Name_Unrestricted : constant Name_Id := N + 362; - Name_Uppercase : constant Name_Id := N + 363; - Name_User : constant Name_Id := N + 364; - Name_VAX_Float : constant Name_Id := N + 365; - Name_VMS : constant Name_Id := N + 366; - Name_Vtable_Ptr : constant Name_Id := N + 367; - Name_Working_Storage : constant Name_Id := N + 368; + Name_As_Is : constant Name_Id := N + 291; + Name_Attribute_Name : constant Name_Id := N + 292; + Name_Body_File_Name : constant Name_Id := N + 293; + Name_Boolean_Entry_Barriers : constant Name_Id := N + 294; + Name_Check : constant Name_Id := N + 295; + Name_Casing : constant Name_Id := N + 296; + Name_Code : constant Name_Id := N + 297; + Name_Component : constant Name_Id := N + 298; + Name_Component_Size_4 : constant Name_Id := N + 299; + Name_Copy : constant Name_Id := N + 300; + Name_D_Float : constant Name_Id := N + 301; + Name_Descriptor : constant Name_Id := N + 302; + Name_Dot_Replacement : constant Name_Id := N + 303; + Name_Dynamic : constant Name_Id := N + 304; + Name_Entity : constant Name_Id := N + 305; + Name_Entry_Count : constant Name_Id := N + 306; + Name_External_Name : constant Name_Id := N + 307; + Name_First_Optional_Parameter : constant Name_Id := N + 308; + Name_Form : constant Name_Id := N + 309; + Name_G_Float : constant Name_Id := N + 310; + Name_Gcc : constant Name_Id := N + 311; + Name_Gnat : constant Name_Id := N + 312; + Name_GPL : constant Name_Id := N + 313; + Name_IEEE_Float : constant Name_Id := N + 314; + Name_Ignore : constant Name_Id := N + 315; + Name_Info : constant Name_Id := N + 316; + Name_Internal : constant Name_Id := N + 317; + Name_Link_Name : constant Name_Id := N + 318; + Name_Lowercase : constant Name_Id := N + 319; + Name_Max_Entry_Queue_Depth : constant Name_Id := N + 320; + Name_Max_Entry_Queue_Length : constant Name_Id := N + 321; + Name_Max_Size : constant Name_Id := N + 322; + Name_Mechanism : constant Name_Id := N + 323; + Name_Message : constant Name_Id := N + 324; + Name_Mixedcase : constant Name_Id := N + 325; + Name_Modified_GPL : constant Name_Id := N + 326; + Name_Name : constant Name_Id := N + 327; + Name_NCA : constant Name_Id := N + 328; + Name_No : constant Name_Id := N + 329; + Name_No_Dependence : constant Name_Id := N + 330; + Name_No_Dynamic_Attachment : constant Name_Id := N + 331; + Name_No_Dynamic_Interrupts : constant Name_Id := N + 332; + Name_No_Requeue : constant Name_Id := N + 333; + Name_No_Requeue_Statements : constant Name_Id := N + 334; + Name_No_Task_Attributes : constant Name_Id := N + 335; + Name_No_Task_Attributes_Package : constant Name_Id := N + 336; + Name_On : constant Name_Id := N + 337; + Name_Parameter_Types : constant Name_Id := N + 338; + Name_Reference : constant Name_Id := N + 339; + Name_Restricted : constant Name_Id := N + 340; + Name_Result_Mechanism : constant Name_Id := N + 341; + Name_Result_Type : constant Name_Id := N + 342; + Name_Runtime : constant Name_Id := N + 343; + Name_SB : constant Name_Id := N + 344; + Name_Secondary_Stack_Size : constant Name_Id := N + 345; + Name_Section : constant Name_Id := N + 346; + Name_Semaphore : constant Name_Id := N + 347; + Name_Simple_Barriers : constant Name_Id := N + 348; + Name_Spec_File_Name : constant Name_Id := N + 349; + Name_State : constant Name_Id := N + 350; + Name_Static : constant Name_Id := N + 351; + Name_Stack_Size : constant Name_Id := N + 352; + Name_Subunit_File_Name : constant Name_Id := N + 353; + Name_Task_Stack_Size_Default : constant Name_Id := N + 354; + Name_Task_Type : constant Name_Id := N + 355; + Name_Time_Slicing_Enabled : constant Name_Id := N + 356; + Name_Top_Guard : constant Name_Id := N + 357; + Name_UBA : constant Name_Id := N + 358; + Name_UBS : constant Name_Id := N + 359; + Name_UBSB : constant Name_Id := N + 360; + Name_Unit_Name : constant Name_Id := N + 361; + Name_Unknown : constant Name_Id := N + 362; + Name_Unrestricted : constant Name_Id := N + 363; + Name_Uppercase : constant Name_Id := N + 364; + Name_User : constant Name_Id := N + 365; + Name_VAX_Float : constant Name_Id := N + 366; + Name_VMS : constant Name_Id := N + 367; + Name_Vtable_Ptr : constant Name_Id := N + 368; + Name_Working_Storage : constant Name_Id := N + 369; -- 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 @@ -662,170 +663,170 @@ package Snames is -- The entries marked VMS are recognized only in OpenVMS implementations -- of GNAT, and are treated as illegal in all other contexts. - First_Attribute_Name : constant Name_Id := N + 369; - Name_Abort_Signal : constant Name_Id := N + 369; -- GNAT - Name_Access : constant Name_Id := N + 370; - Name_Address : constant Name_Id := N + 371; - Name_Address_Size : constant Name_Id := N + 372; -- GNAT - Name_Aft : constant Name_Id := N + 373; - Name_Alignment : constant Name_Id := N + 374; - Name_Asm_Input : constant Name_Id := N + 375; -- GNAT - Name_Asm_Output : constant Name_Id := N + 376; -- GNAT - Name_AST_Entry : constant Name_Id := N + 377; -- VMS - Name_Bit : constant Name_Id := N + 378; -- GNAT - Name_Bit_Order : constant Name_Id := N + 379; - Name_Bit_Position : constant Name_Id := N + 380; -- GNAT - Name_Body_Version : constant Name_Id := N + 381; - Name_Callable : constant Name_Id := N + 382; - Name_Caller : constant Name_Id := N + 383; - Name_Code_Address : constant Name_Id := N + 384; -- GNAT - Name_Component_Size : constant Name_Id := N + 385; - Name_Compose : constant Name_Id := N + 386; - Name_Constrained : constant Name_Id := N + 387; - Name_Count : constant Name_Id := N + 388; - Name_Default_Bit_Order : constant Name_Id := N + 389; -- GNAT - Name_Definite : constant Name_Id := N + 390; - Name_Delta : constant Name_Id := N + 391; - Name_Denorm : constant Name_Id := N + 392; - Name_Digits : constant Name_Id := N + 393; - Name_Elaborated : constant Name_Id := N + 394; -- GNAT - Name_Emax : constant Name_Id := N + 395; -- Ada 83 - Name_Enabled : constant Name_Id := N + 396; -- GNAT - Name_Enum_Rep : constant Name_Id := N + 397; -- GNAT - Name_Epsilon : constant Name_Id := N + 398; -- Ada 83 - Name_Exponent : constant Name_Id := N + 399; - Name_External_Tag : constant Name_Id := N + 400; - Name_Fast_Math : constant Name_Id := N + 401; -- GNAT - Name_First : constant Name_Id := N + 402; - Name_First_Bit : constant Name_Id := N + 403; - Name_Fixed_Value : constant Name_Id := N + 404; -- GNAT - Name_Fore : constant Name_Id := N + 405; - Name_Has_Access_Values : constant Name_Id := N + 406; -- GNAT - Name_Has_Discriminants : constant Name_Id := N + 407; -- GNAT - Name_Identity : constant Name_Id := N + 408; - Name_Img : constant Name_Id := N + 409; -- GNAT - Name_Integer_Value : constant Name_Id := N + 410; -- GNAT - Name_Large : constant Name_Id := N + 411; -- Ada 83 - Name_Last : constant Name_Id := N + 412; - Name_Last_Bit : constant Name_Id := N + 413; - Name_Leading_Part : constant Name_Id := N + 414; - Name_Length : constant Name_Id := N + 415; - Name_Machine_Emax : constant Name_Id := N + 416; - Name_Machine_Emin : constant Name_Id := N + 417; - Name_Machine_Mantissa : constant Name_Id := N + 418; - Name_Machine_Overflows : constant Name_Id := N + 419; - Name_Machine_Radix : constant Name_Id := N + 420; - Name_Machine_Rounding : constant Name_Id := N + 421; -- Ada 05 - Name_Machine_Rounds : constant Name_Id := N + 422; - Name_Machine_Size : constant Name_Id := N + 423; -- GNAT - Name_Mantissa : constant Name_Id := N + 424; -- Ada 83 - Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 425; - Name_Maximum_Alignment : constant Name_Id := N + 426; -- GNAT - Name_Mechanism_Code : constant Name_Id := N + 427; -- GNAT - Name_Mod : constant Name_Id := N + 428; -- Ada 05 - Name_Model_Emin : constant Name_Id := N + 429; - Name_Model_Epsilon : constant Name_Id := N + 430; - Name_Model_Mantissa : constant Name_Id := N + 431; - Name_Model_Small : constant Name_Id := N + 432; - Name_Modulus : constant Name_Id := N + 433; - Name_Null_Parameter : constant Name_Id := N + 434; -- GNAT - Name_Object_Size : constant Name_Id := N + 435; -- GNAT - Name_Partition_ID : constant Name_Id := N + 436; - Name_Passed_By_Reference : constant Name_Id := N + 437; -- GNAT - Name_Pool_Address : constant Name_Id := N + 438; - Name_Pos : constant Name_Id := N + 439; - Name_Position : constant Name_Id := N + 440; - Name_Priority : constant Name_Id := N + 441; -- Ada 05 - Name_Range : constant Name_Id := N + 442; - Name_Range_Length : constant Name_Id := N + 443; -- GNAT - Name_Round : constant Name_Id := N + 444; - Name_Safe_Emax : constant Name_Id := N + 445; -- Ada 83 - Name_Safe_First : constant Name_Id := N + 446; - Name_Safe_Large : constant Name_Id := N + 447; -- Ada 83 - Name_Safe_Last : constant Name_Id := N + 448; - Name_Safe_Small : constant Name_Id := N + 449; -- Ada 83 - Name_Scale : constant Name_Id := N + 450; - Name_Scaling : constant Name_Id := N + 451; - Name_Signed_Zeros : constant Name_Id := N + 452; - Name_Size : constant Name_Id := N + 453; - Name_Small : constant Name_Id := N + 454; - Name_Storage_Size : constant Name_Id := N + 455; - Name_Storage_Unit : constant Name_Id := N + 456; -- GNAT - Name_Stream_Size : constant Name_Id := N + 457; -- Ada 05 - Name_Tag : constant Name_Id := N + 458; - Name_Target_Name : constant Name_Id := N + 459; -- GNAT - Name_Terminated : constant Name_Id := N + 460; - Name_To_Address : constant Name_Id := N + 461; -- GNAT - Name_Type_Class : constant Name_Id := N + 462; -- GNAT - Name_UET_Address : constant Name_Id := N + 463; -- GNAT - Name_Unbiased_Rounding : constant Name_Id := N + 464; - Name_Unchecked_Access : constant Name_Id := N + 465; - Name_Unconstrained_Array : constant Name_Id := N + 466; - Name_Universal_Literal_String : constant Name_Id := N + 467; -- GNAT - Name_Unrestricted_Access : constant Name_Id := N + 468; -- GNAT - Name_VADS_Size : constant Name_Id := N + 469; -- GNAT - Name_Val : constant Name_Id := N + 470; - Name_Valid : constant Name_Id := N + 471; - Name_Value_Size : constant Name_Id := N + 472; -- GNAT - Name_Version : constant Name_Id := N + 473; - Name_Wchar_T_Size : constant Name_Id := N + 474; -- GNAT - Name_Wide_Wide_Width : constant Name_Id := N + 475; -- Ada 05 - Name_Wide_Width : constant Name_Id := N + 476; - Name_Width : constant Name_Id := N + 477; - Name_Word_Size : constant Name_Id := N + 478; -- GNAT + First_Attribute_Name : constant Name_Id := N + 370; + Name_Abort_Signal : constant Name_Id := N + 370; -- GNAT + Name_Access : constant Name_Id := N + 371; + Name_Address : constant Name_Id := N + 372; + Name_Address_Size : constant Name_Id := N + 373; -- GNAT + Name_Aft : constant Name_Id := N + 374; + Name_Alignment : constant Name_Id := N + 375; + Name_Asm_Input : constant Name_Id := N + 376; -- GNAT + Name_Asm_Output : constant Name_Id := N + 377; -- GNAT + Name_AST_Entry : constant Name_Id := N + 378; -- VMS + Name_Bit : constant Name_Id := N + 379; -- GNAT + Name_Bit_Order : constant Name_Id := N + 380; + Name_Bit_Position : constant Name_Id := N + 381; -- GNAT + Name_Body_Version : constant Name_Id := N + 382; + Name_Callable : constant Name_Id := N + 383; + Name_Caller : constant Name_Id := N + 384; + Name_Code_Address : constant Name_Id := N + 385; -- GNAT + Name_Component_Size : constant Name_Id := N + 386; + Name_Compose : constant Name_Id := N + 387; + Name_Constrained : constant Name_Id := N + 388; + Name_Count : constant Name_Id := N + 389; + Name_Default_Bit_Order : constant Name_Id := N + 390; -- GNAT + Name_Definite : constant Name_Id := N + 391; + Name_Delta : constant Name_Id := N + 392; + Name_Denorm : constant Name_Id := N + 393; + Name_Digits : constant Name_Id := N + 394; + Name_Elaborated : constant Name_Id := N + 395; -- GNAT + Name_Emax : constant Name_Id := N + 396; -- Ada 83 + Name_Enabled : constant Name_Id := N + 397; -- GNAT + Name_Enum_Rep : constant Name_Id := N + 398; -- GNAT + Name_Epsilon : constant Name_Id := N + 399; -- Ada 83 + Name_Exponent : constant Name_Id := N + 400; + Name_External_Tag : constant Name_Id := N + 401; + Name_Fast_Math : constant Name_Id := N + 402; -- GNAT + Name_First : constant Name_Id := N + 403; + Name_First_Bit : constant Name_Id := N + 404; + Name_Fixed_Value : constant Name_Id := N + 405; -- GNAT + Name_Fore : constant Name_Id := N + 406; + Name_Has_Access_Values : constant Name_Id := N + 407; -- GNAT + Name_Has_Discriminants : constant Name_Id := N + 408; -- GNAT + Name_Identity : constant Name_Id := N + 409; + Name_Img : constant Name_Id := N + 410; -- GNAT + Name_Integer_Value : constant Name_Id := N + 411; -- GNAT + Name_Large : constant Name_Id := N + 412; -- Ada 83 + Name_Last : constant Name_Id := N + 413; + Name_Last_Bit : constant Name_Id := N + 414; + Name_Leading_Part : constant Name_Id := N + 415; + Name_Length : constant Name_Id := N + 416; + Name_Machine_Emax : constant Name_Id := N + 417; + Name_Machine_Emin : constant Name_Id := N + 418; + Name_Machine_Mantissa : constant Name_Id := N + 419; + Name_Machine_Overflows : constant Name_Id := N + 420; + Name_Machine_Radix : constant Name_Id := N + 421; + Name_Machine_Rounding : constant Name_Id := N + 422; -- Ada 05 + Name_Machine_Rounds : constant Name_Id := N + 423; + Name_Machine_Size : constant Name_Id := N + 424; -- GNAT + Name_Mantissa : constant Name_Id := N + 425; -- Ada 83 + Name_Max_Size_In_Storage_Elements : constant Name_Id := N + 426; + Name_Maximum_Alignment : constant Name_Id := N + 427; -- GNAT + Name_Mechanism_Code : constant Name_Id := N + 428; -- GNAT + Name_Mod : constant Name_Id := N + 429; -- Ada 05 + Name_Model_Emin : constant Name_Id := N + 430; + Name_Model_Epsilon : constant Name_Id := N + 431; + Name_Model_Mantissa : constant Name_Id := N + 432; + Name_Model_Small : constant Name_Id := N + 433; + Name_Modulus : constant Name_Id := N + 434; + Name_Null_Parameter : constant Name_Id := N + 435; -- GNAT + Name_Object_Size : constant Name_Id := N + 436; -- GNAT + Name_Partition_ID : constant Name_Id := N + 437; + Name_Passed_By_Reference : constant Name_Id := N + 438; -- GNAT + Name_Pool_Address : constant Name_Id := N + 439; + Name_Pos : constant Name_Id := N + 440; + Name_Position : constant Name_Id := N + 441; + Name_Priority : constant Name_Id := N + 442; -- Ada 05 + Name_Range : constant Name_Id := N + 443; + Name_Range_Length : constant Name_Id := N + 444; -- GNAT + Name_Round : constant Name_Id := N + 445; + Name_Safe_Emax : constant Name_Id := N + 446; -- Ada 83 + Name_Safe_First : constant Name_Id := N + 447; + Name_Safe_Large : constant Name_Id := N + 448; -- Ada 83 + Name_Safe_Last : constant Name_Id := N + 449; + Name_Safe_Small : constant Name_Id := N + 450; -- Ada 83 + Name_Scale : constant Name_Id := N + 451; + Name_Scaling : constant Name_Id := N + 452; + Name_Signed_Zeros : constant Name_Id := N + 453; + Name_Size : constant Name_Id := N + 454; + Name_Small : constant Name_Id := N + 455; + Name_Storage_Size : constant Name_Id := N + 456; + Name_Storage_Unit : constant Name_Id := N + 457; -- GNAT + Name_Stream_Size : constant Name_Id := N + 458; -- Ada 05 + Name_Tag : constant Name_Id := N + 459; + Name_Target_Name : constant Name_Id := N + 460; -- GNAT + Name_Terminated : constant Name_Id := N + 461; + Name_To_Address : constant Name_Id := N + 462; -- GNAT + Name_Type_Class : constant Name_Id := N + 463; -- GNAT + Name_UET_Address : constant Name_Id := N + 464; -- GNAT + Name_Unbiased_Rounding : constant Name_Id := N + 465; + Name_Unchecked_Access : constant Name_Id := N + 466; + Name_Unconstrained_Array : constant Name_Id := N + 467; + Name_Universal_Literal_String : constant Name_Id := N + 468; -- GNAT + Name_Unrestricted_Access : constant Name_Id := N + 469; -- GNAT + Name_VADS_Size : constant Name_Id := N + 470; -- GNAT + Name_Val : constant Name_Id := N + 471; + Name_Valid : constant Name_Id := N + 472; + Name_Value_Size : constant Name_Id := N + 473; -- GNAT + Name_Version : constant Name_Id := N + 474; + Name_Wchar_T_Size : constant Name_Id := N + 475; -- GNAT + Name_Wide_Wide_Width : constant Name_Id := N + 476; -- Ada 05 + Name_Wide_Width : constant Name_Id := N + 477; + Name_Width : constant Name_Id := N + 478; + Name_Word_Size : constant Name_Id := N + 479; -- GNAT -- Attributes that designate attributes returning renamable functions, -- i.e. functions that return other than a universal value and that -- have non-universal arguments. - First_Renamable_Function_Attribute : constant Name_Id := N + 479; - Name_Adjacent : constant Name_Id := N + 479; - Name_Ceiling : constant Name_Id := N + 480; - Name_Copy_Sign : constant Name_Id := N + 481; - Name_Floor : constant Name_Id := N + 482; - Name_Fraction : constant Name_Id := N + 483; - Name_Image : constant Name_Id := N + 484; - Name_Input : constant Name_Id := N + 485; - Name_Machine : constant Name_Id := N + 486; - Name_Max : constant Name_Id := N + 487; - Name_Min : constant Name_Id := N + 488; - Name_Model : constant Name_Id := N + 489; - Name_Pred : constant Name_Id := N + 490; - Name_Remainder : constant Name_Id := N + 491; - Name_Rounding : constant Name_Id := N + 492; - Name_Succ : constant Name_Id := N + 493; - Name_Truncation : constant Name_Id := N + 494; - Name_Value : constant Name_Id := N + 495; - Name_Wide_Image : constant Name_Id := N + 496; - Name_Wide_Wide_Image : constant Name_Id := N + 497; - Name_Wide_Value : constant Name_Id := N + 498; - Name_Wide_Wide_Value : constant Name_Id := N + 499; - Last_Renamable_Function_Attribute : constant Name_Id := N + 499; + First_Renamable_Function_Attribute : constant Name_Id := N + 480; + Name_Adjacent : constant Name_Id := N + 480; + Name_Ceiling : constant Name_Id := N + 481; + Name_Copy_Sign : constant Name_Id := N + 482; + Name_Floor : constant Name_Id := N + 483; + Name_Fraction : constant Name_Id := N + 484; + Name_Image : constant Name_Id := N + 485; + Name_Input : constant Name_Id := N + 486; + Name_Machine : constant Name_Id := N + 487; + Name_Max : constant Name_Id := N + 488; + Name_Min : constant Name_Id := N + 489; + Name_Model : constant Name_Id := N + 490; + Name_Pred : constant Name_Id := N + 491; + Name_Remainder : constant Name_Id := N + 492; + Name_Rounding : constant Name_Id := N + 493; + Name_Succ : constant Name_Id := N + 494; + Name_Truncation : constant Name_Id := N + 495; + Name_Value : constant Name_Id := N + 496; + Name_Wide_Image : constant Name_Id := N + 497; + Name_Wide_Wide_Image : constant Name_Id := N + 498; + Name_Wide_Value : constant Name_Id := N + 499; + Name_Wide_Wide_Value : constant Name_Id := N + 500; + Last_Renamable_Function_Attribute : constant Name_Id := N + 500; -- Attributes that designate procedures - First_Procedure_Attribute : constant Name_Id := N + 500; - Name_Output : constant Name_Id := N + 500; - Name_Read : constant Name_Id := N + 501; - Name_Write : constant Name_Id := N + 502; - Last_Procedure_Attribute : constant Name_Id := N + 502; + First_Procedure_Attribute : constant Name_Id := N + 501; + Name_Output : constant Name_Id := N + 501; + Name_Read : constant Name_Id := N + 502; + Name_Write : constant Name_Id := N + 503; + Last_Procedure_Attribute : constant Name_Id := N + 503; -- Remaining attributes are ones that return entities - First_Entity_Attribute_Name : constant Name_Id := N + 503; - Name_Elab_Body : constant Name_Id := N + 503; -- GNAT - Name_Elab_Spec : constant Name_Id := N + 504; -- GNAT - Name_Storage_Pool : constant Name_Id := N + 505; + First_Entity_Attribute_Name : constant Name_Id := N + 504; + Name_Elab_Body : constant Name_Id := N + 504; -- GNAT + Name_Elab_Spec : constant Name_Id := N + 505; -- GNAT + Name_Storage_Pool : constant Name_Id := N + 506; -- These attributes are the ones that return types - First_Type_Attribute_Name : constant Name_Id := N + 506; - Name_Base : constant Name_Id := N + 506; - Name_Class : constant Name_Id := N + 507; - Name_Stub_Type : constant Name_Id := N + 508; - Last_Type_Attribute_Name : constant Name_Id := N + 508; - Last_Entity_Attribute_Name : constant Name_Id := N + 508; - Last_Attribute_Name : constant Name_Id := N + 508; + First_Type_Attribute_Name : constant Name_Id := N + 507; + Name_Base : constant Name_Id := N + 507; + Name_Class : constant Name_Id := N + 508; + Name_Stub_Type : constant Name_Id := N + 509; + Last_Type_Attribute_Name : constant Name_Id := N + 509; + Last_Entity_Attribute_Name : constant Name_Id := N + 509; + Last_Attribute_Name : constant Name_Id := N + 509; -- Names of recognized locking policy identifiers @@ -833,10 +834,10 @@ package Snames is -- name (e.g. C for Ceiling_Locking). If new policy names are added, -- the first character must be distinct. - First_Locking_Policy_Name : constant Name_Id := N + 509; - Name_Ceiling_Locking : constant Name_Id := N + 509; - Name_Inheritance_Locking : constant Name_Id := N + 510; - Last_Locking_Policy_Name : constant Name_Id := N + 510; + First_Locking_Policy_Name : constant Name_Id := N + 510; + Name_Ceiling_Locking : constant Name_Id := N + 510; + Name_Inheritance_Locking : constant Name_Id := N + 511; + Last_Locking_Policy_Name : constant Name_Id := N + 511; -- Names of recognized queuing policy identifiers @@ -844,10 +845,10 @@ package Snames is -- name (e.g. F for FIFO_Queuing). If new policy names are added, -- the first character must be distinct. - First_Queuing_Policy_Name : constant Name_Id := N + 511; - Name_FIFO_Queuing : constant Name_Id := N + 511; - Name_Priority_Queuing : constant Name_Id := N + 512; - Last_Queuing_Policy_Name : constant Name_Id := N + 512; + First_Queuing_Policy_Name : constant Name_Id := N + 512; + Name_FIFO_Queuing : constant Name_Id := N + 512; + Name_Priority_Queuing : constant Name_Id := N + 513; + Last_Queuing_Policy_Name : constant Name_Id := N + 513; -- Names of recognized task dispatching policy identifiers @@ -855,273 +856,273 @@ package Snames is -- name (e.g. F for FIFO_Within_Priorities). If new policy names -- are added, the first character must be distinct. - First_Task_Dispatching_Policy_Name : constant Name_Id := N + 513; - Name_EDF_Across_Priorities : constant Name_Id := N + 513; - Name_FIFO_Within_Priorities : constant Name_Id := N + 514; + First_Task_Dispatching_Policy_Name : constant Name_Id := N + 514; + Name_EDF_Across_Priorities : constant Name_Id := N + 514; + Name_FIFO_Within_Priorities : constant Name_Id := N + 515; Name_Non_Preemptive_Within_Priorities : constant Name_Id := N + 513; - Name_Round_Robin_Within_Priorities : constant Name_Id := N + 515; - Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 515; + Name_Round_Robin_Within_Priorities : constant Name_Id := N + 516; + Last_Task_Dispatching_Policy_Name : constant Name_Id := N + 516; -- Names of recognized checks for pragma Suppress - First_Check_Name : constant Name_Id := N + 516; - Name_Access_Check : constant Name_Id := N + 516; - Name_Accessibility_Check : constant Name_Id := N + 517; - Name_Alignment_Check : constant Name_Id := N + 518; -- GNAT - Name_Discriminant_Check : constant Name_Id := N + 519; - Name_Division_Check : constant Name_Id := N + 520; - Name_Elaboration_Check : constant Name_Id := N + 521; - Name_Index_Check : constant Name_Id := N + 522; - Name_Length_Check : constant Name_Id := N + 523; - Name_Overflow_Check : constant Name_Id := N + 524; - Name_Range_Check : constant Name_Id := N + 525; - Name_Storage_Check : constant Name_Id := N + 526; - Name_Tag_Check : constant Name_Id := N + 527; - Name_Validity_Check : constant Name_Id := N + 528; -- GNAT - Name_All_Checks : constant Name_Id := N + 529; - Last_Check_Name : constant Name_Id := N + 529; + First_Check_Name : constant Name_Id := N + 517; + Name_Access_Check : constant Name_Id := N + 517; + Name_Accessibility_Check : constant Name_Id := N + 518; + Name_Alignment_Check : constant Name_Id := N + 519; -- GNAT + Name_Discriminant_Check : constant Name_Id := N + 520; + Name_Division_Check : constant Name_Id := N + 521; + Name_Elaboration_Check : constant Name_Id := N + 522; + Name_Index_Check : constant Name_Id := N + 523; + Name_Length_Check : constant Name_Id := N + 524; + Name_Overflow_Check : constant Name_Id := N + 525; + Name_Range_Check : constant Name_Id := N + 526; + Name_Storage_Check : constant Name_Id := N + 527; + Name_Tag_Check : constant Name_Id := N + 528; + Name_Validity_Check : constant Name_Id := N + 529; -- GNAT + Name_All_Checks : constant Name_Id := N + 530; + Last_Check_Name : constant Name_Id := N + 530; -- Names corresponding to reserved keywords, excluding those already -- declared in the attribute list (Access, Delta, Digits, Mod, Range). - Name_Abort : constant Name_Id := N + 530; - Name_Abs : constant Name_Id := N + 531; - Name_Accept : constant Name_Id := N + 532; - Name_And : constant Name_Id := N + 533; - Name_All : constant Name_Id := N + 534; - Name_Array : constant Name_Id := N + 535; - Name_At : constant Name_Id := N + 536; - Name_Begin : constant Name_Id := N + 537; - Name_Body : constant Name_Id := N + 538; - Name_Case : constant Name_Id := N + 539; - Name_Constant : constant Name_Id := N + 540; - Name_Declare : constant Name_Id := N + 541; - Name_Delay : constant Name_Id := N + 542; - Name_Do : constant Name_Id := N + 543; - Name_Else : constant Name_Id := N + 544; - Name_Elsif : constant Name_Id := N + 545; - Name_End : constant Name_Id := N + 546; - Name_Entry : constant Name_Id := N + 547; - Name_Exception : constant Name_Id := N + 548; - Name_Exit : constant Name_Id := N + 549; - Name_For : constant Name_Id := N + 550; - Name_Function : constant Name_Id := N + 551; - Name_Generic : constant Name_Id := N + 552; - Name_Goto : constant Name_Id := N + 553; - Name_If : constant Name_Id := N + 554; - Name_In : constant Name_Id := N + 555; - Name_Is : constant Name_Id := N + 556; - Name_Limited : constant Name_Id := N + 557; - Name_Loop : constant Name_Id := N + 558; - Name_New : constant Name_Id := N + 559; - Name_Not : constant Name_Id := N + 560; - Name_Null : constant Name_Id := N + 561; - Name_Of : constant Name_Id := N + 562; - Name_Or : constant Name_Id := N + 563; - Name_Others : constant Name_Id := N + 564; - Name_Out : constant Name_Id := N + 565; - Name_Package : constant Name_Id := N + 566; - Name_Pragma : constant Name_Id := N + 567; - Name_Private : constant Name_Id := N + 568; - Name_Procedure : constant Name_Id := N + 569; - Name_Raise : constant Name_Id := N + 570; - Name_Record : constant Name_Id := N + 571; - Name_Rem : constant Name_Id := N + 572; - Name_Renames : constant Name_Id := N + 573; - Name_Return : constant Name_Id := N + 574; - Name_Reverse : constant Name_Id := N + 575; - Name_Select : constant Name_Id := N + 576; - Name_Separate : constant Name_Id := N + 577; - Name_Subtype : constant Name_Id := N + 578; - Name_Task : constant Name_Id := N + 579; - Name_Terminate : constant Name_Id := N + 580; - Name_Then : constant Name_Id := N + 581; - Name_Type : constant Name_Id := N + 582; - Name_Use : constant Name_Id := N + 583; - Name_When : constant Name_Id := N + 584; - Name_While : constant Name_Id := N + 585; - Name_With : constant Name_Id := N + 586; - Name_Xor : constant Name_Id := N + 587; + Name_Abort : constant Name_Id := N + 531; + Name_Abs : constant Name_Id := N + 532; + Name_Accept : constant Name_Id := N + 533; + Name_And : constant Name_Id := N + 534; + Name_All : constant Name_Id := N + 535; + Name_Array : constant Name_Id := N + 536; + Name_At : constant Name_Id := N + 537; + Name_Begin : constant Name_Id := N + 538; + Name_Body : constant Name_Id := N + 539; + Name_Case : constant Name_Id := N + 540; + Name_Constant : constant Name_Id := N + 541; + Name_Declare : constant Name_Id := N + 542; + Name_Delay : constant Name_Id := N + 543; + Name_Do : constant Name_Id := N + 544; + Name_Else : constant Name_Id := N + 545; + Name_Elsif : constant Name_Id := N + 546; + Name_End : constant Name_Id := N + 547; + Name_Entry : constant Name_Id := N + 548; + Name_Exception : constant Name_Id := N + 549; + Name_Exit : constant Name_Id := N + 550; + Name_For : constant Name_Id := N + 551; + Name_Function : constant Name_Id := N + 552; + Name_Generic : constant Name_Id := N + 553; + Name_Goto : constant Name_Id := N + 554; + Name_If : constant Name_Id := N + 555; + Name_In : constant Name_Id := N + 556; + Name_Is : constant Name_Id := N + 557; + Name_Limited : constant Name_Id := N + 558; + Name_Loop : constant Name_Id := N + 559; + Name_New : constant Name_Id := N + 560; + Name_Not : constant Name_Id := N + 561; + Name_Null : constant Name_Id := N + 562; + Name_Of : constant Name_Id := N + 563; + Name_Or : constant Name_Id := N + 564; + Name_Others : constant Name_Id := N + 565; + Name_Out : constant Name_Id := N + 566; + Name_Package : constant Name_Id := N + 567; + Name_Pragma : constant Name_Id := N + 568; + Name_Private : constant Name_Id := N + 569; + Name_Procedure : constant Name_Id := N + 570; + Name_Raise : constant Name_Id := N + 571; + Name_Record : constant Name_Id := N + 572; + Name_Rem : constant Name_Id := N + 573; + Name_Renames : constant Name_Id := N + 574; + Name_Return : constant Name_Id := N + 575; + Name_Reverse : constant Name_Id := N + 576; + Name_Select : constant Name_Id := N + 577; + Name_Separate : constant Name_Id := N + 578; + Name_Subtype : constant Name_Id := N + 579; + Name_Task : constant Name_Id := N + 580; + Name_Terminate : constant Name_Id := N + 581; + Name_Then : constant Name_Id := N + 582; + Name_Type : constant Name_Id := N + 583; + Name_Use : constant Name_Id := N + 584; + Name_When : constant Name_Id := N + 585; + Name_While : constant Name_Id := N + 586; + Name_With : constant Name_Id := N + 587; + Name_Xor : constant Name_Id := N + 588; -- Names of intrinsic subprograms -- Note: Asm is missing from this list, since Asm is a legitimate -- convention name. So is To_Adress, which is a GNAT attribute. - First_Intrinsic_Name : constant Name_Id := N + 588; - Name_Divide : constant Name_Id := N + 588; - Name_Enclosing_Entity : constant Name_Id := N + 589; - Name_Exception_Information : constant Name_Id := N + 590; - Name_Exception_Message : constant Name_Id := N + 591; - Name_Exception_Name : constant Name_Id := N + 592; - Name_File : constant Name_Id := N + 593; - Name_Generic_Dispatching_Constructor : constant Name_Id := N + 594; - Name_Import_Address : constant Name_Id := N + 595; - Name_Import_Largest_Value : constant Name_Id := N + 596; - Name_Import_Value : constant Name_Id := N + 597; - Name_Is_Negative : constant Name_Id := N + 598; - Name_Line : constant Name_Id := N + 599; - Name_Rotate_Left : constant Name_Id := N + 600; - Name_Rotate_Right : constant Name_Id := N + 601; - Name_Shift_Left : constant Name_Id := N + 602; - Name_Shift_Right : constant Name_Id := N + 603; - Name_Shift_Right_Arithmetic : constant Name_Id := N + 604; - Name_Source_Location : constant Name_Id := N + 605; - Name_Unchecked_Conversion : constant Name_Id := N + 606; - Name_Unchecked_Deallocation : constant Name_Id := N + 607; - Name_To_Pointer : constant Name_Id := N + 608; - Last_Intrinsic_Name : constant Name_Id := N + 608; + First_Intrinsic_Name : constant Name_Id := N + 589; + Name_Divide : constant Name_Id := N + 589; + Name_Enclosing_Entity : constant Name_Id := N + 590; + Name_Exception_Information : constant Name_Id := N + 591; + Name_Exception_Message : constant Name_Id := N + 592; + Name_Exception_Name : constant Name_Id := N + 593; + Name_File : constant Name_Id := N + 594; + Name_Generic_Dispatching_Constructor : constant Name_Id := N + 595; + Name_Import_Address : constant Name_Id := N + 596; + Name_Import_Largest_Value : constant Name_Id := N + 597; + Name_Import_Value : constant Name_Id := N + 598; + Name_Is_Negative : constant Name_Id := N + 599; + Name_Line : constant Name_Id := N + 600; + Name_Rotate_Left : constant Name_Id := N + 601; + Name_Rotate_Right : constant Name_Id := N + 602; + Name_Shift_Left : constant Name_Id := N + 603; + Name_Shift_Right : constant Name_Id := N + 604; + Name_Shift_Right_Arithmetic : constant Name_Id := N + 605; + Name_Source_Location : constant Name_Id := N + 606; + Name_Unchecked_Conversion : constant Name_Id := N + 607; + Name_Unchecked_Deallocation : constant Name_Id := N + 608; + Name_To_Pointer : constant Name_Id := N + 609; + Last_Intrinsic_Name : constant Name_Id := N + 609; -- Names used in processing intrinsic calls - Name_Free : constant Name_Id := N + 609; + Name_Free : constant Name_Id := N + 610; -- Reserved words used only in Ada 95 - First_95_Reserved_Word : constant Name_Id := N + 610; - Name_Abstract : constant Name_Id := N + 610; - Name_Aliased : constant Name_Id := N + 611; - Name_Protected : constant Name_Id := N + 612; - Name_Until : constant Name_Id := N + 613; - Name_Requeue : constant Name_Id := N + 614; - Name_Tagged : constant Name_Id := N + 615; - Last_95_Reserved_Word : constant Name_Id := N + 615; + First_95_Reserved_Word : constant Name_Id := N + 611; + Name_Abstract : constant Name_Id := N + 611; + Name_Aliased : constant Name_Id := N + 612; + Name_Protected : constant Name_Id := N + 613; + Name_Until : constant Name_Id := N + 614; + Name_Requeue : constant Name_Id := N + 615; + Name_Tagged : constant Name_Id := N + 616; + Last_95_Reserved_Word : constant Name_Id := N + 616; subtype Ada_95_Reserved_Words is Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word; -- Miscellaneous names used in semantic checking - Name_Raise_Exception : constant Name_Id := N + 616; + Name_Raise_Exception : constant Name_Id := N + 617; -- Additional reserved words and identifiers used in GNAT Project Files -- Note that Name_External is already previously declared - Name_Ada_Roots : constant Name_Id := N + 617; - Name_Archive_Builder : constant Name_Id := N + 618; - Name_Archive_Indexer : constant Name_Id := N + 619; - Name_Archive_Suffix : constant Name_Id := N + 620; - Name_Binder : constant Name_Id := N + 621; - Name_Binder_Prefix : constant Name_Id := N + 622; - Name_Body_Suffix : constant Name_Id := N + 623; - Name_Builder : constant Name_Id := N + 624; - Name_Builder_Switches : constant Name_Id := N + 625; - Name_Compiler : constant Name_Id := N + 626; - Name_Compiler_Kind : constant Name_Id := N + 627; - Name_Config_Body_File_Name : constant Name_Id := N + 628; - Name_Config_Body_File_Name_Pattern : constant Name_Id := N + 629; - Name_Config_File_Switches : constant Name_Id := N + 630; - Name_Config_File_Unique : constant Name_Id := N + 631; - Name_Config_Spec_File_Name : constant Name_Id := N + 632; - Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + 633; - Name_Cross_Reference : constant Name_Id := N + 634; - Name_Default_Language : constant Name_Id := N + 635; - Name_Default_Switches : constant Name_Id := N + 636; - Name_Dependency_Driver : constant Name_Id := N + 637; - Name_Dependency_File_Kind : constant Name_Id := N + 638; - Name_Dependency_Switches : constant Name_Id := N + 639; - Name_Driver : constant Name_Id := N + 640; - Name_Excluded_Source_Dirs : constant Name_Id := N + 641; - Name_Excluded_Source_Files : constant Name_Id := N + 642; - Name_Exec_Dir : constant Name_Id := N + 643; - Name_Executable : constant Name_Id := N + 644; - Name_Executable_Suffix : constant Name_Id := N + 645; - Name_Extends : constant Name_Id := N + 646; - Name_Externally_Built : constant Name_Id := N + 647; - Name_Finder : constant Name_Id := N + 648; - Name_Global_Configuration_Pragmas : constant Name_Id := N + 649; - Name_Global_Config_File : constant Name_Id := N + 650; - Name_Gnatls : constant Name_Id := N + 651; - Name_Gnatstub : constant Name_Id := N + 652; - Name_Implementation : constant Name_Id := N + 653; - Name_Implementation_Exceptions : constant Name_Id := N + 654; - Name_Implementation_Suffix : constant Name_Id := N + 655; - Name_Include_Switches : constant Name_Id := N + 656; - Name_Include_Path : constant Name_Id := N + 657; - Name_Include_Path_File : constant Name_Id := N + 658; - Name_Language_Kind : constant Name_Id := N + 659; - Name_Language_Processing : constant Name_Id := N + 660; - Name_Languages : constant Name_Id := N + 661; - Name_Library_Ali_Dir : constant Name_Id := N + 662; - Name_Library_Auto_Init : constant Name_Id := N + 663; - Name_Library_Auto_Init_Supported : constant Name_Id := N + 664; - Name_Library_Builder : constant Name_Id := N + 665; - Name_Library_Dir : constant Name_Id := N + 666; - Name_Library_GCC : constant Name_Id := N + 667; - Name_Library_Interface : constant Name_Id := N + 668; - Name_Library_Kind : constant Name_Id := N + 669; - Name_Library_Name : constant Name_Id := N + 670; - Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + 671; - Name_Library_Options : constant Name_Id := N + 672; - Name_Library_Partial_Linker : constant Name_Id := N + 673; - Name_Library_Reference_Symbol_File : constant Name_Id := N + 674; - Name_Library_Src_Dir : constant Name_Id := N + 675; - Name_Library_Support : constant Name_Id := N + 676; - Name_Library_Symbol_File : constant Name_Id := N + 677; - Name_Library_Symbol_Policy : constant Name_Id := N + 678; - Name_Library_Version : constant Name_Id := N + 679; - Name_Library_Version_Switches : constant Name_Id := N + 680; - Name_Linker : constant Name_Id := N + 681; - Name_Linker_Executable_Option : constant Name_Id := N + 682; - Name_Linker_Lib_Dir_Option : constant Name_Id := N + 683; - Name_Linker_Lib_Name_Option : constant Name_Id := N + 684; - Name_Local_Config_File : constant Name_Id := N + 685; - Name_Local_Configuration_Pragmas : constant Name_Id := N + 686; - Name_Locally_Removed_Files : constant Name_Id := N + 687; - Name_Mapping_File_Switches : constant Name_Id := N + 688; - Name_Mapping_Spec_Suffix : constant Name_Id := N + 689; - Name_Mapping_Body_Suffix : constant Name_Id := N + 690; - Name_Metrics : constant Name_Id := N + 691; - Name_Naming : constant Name_Id := N + 692; - Name_Objects_Path : constant Name_Id := N + 693; - Name_Objects_Path_File : constant Name_Id := N + 694; - Name_Object_Dir : constant Name_Id := N + 695; - Name_Pic_Option : constant Name_Id := N + 696; - Name_Pretty_Printer : constant Name_Id := N + 697; - Name_Prefix : constant Name_Id := N + 698; - Name_Project : constant Name_Id := N + 699; - Name_Roots : constant Name_Id := N + 700; - Name_Required_Switches : constant Name_Id := N + 701; - Name_Run_Path_Option : constant Name_Id := N + 702; - Name_Runtime_Project : constant Name_Id := N + 703; - Name_Shared_Library_Minimum_Switches : constant Name_Id := N + 704; - Name_Shared_Library_Prefix : constant Name_Id := N + 705; - Name_Shared_Library_Suffix : constant Name_Id := N + 706; - Name_Separate_Suffix : constant Name_Id := N + 707; - Name_Source_Dirs : constant Name_Id := N + 708; - Name_Source_Files : constant Name_Id := N + 709; - Name_Source_List_File : constant Name_Id := N + 710; - Name_Spec : constant Name_Id := N + 711; - Name_Spec_Suffix : constant Name_Id := N + 712; - Name_Specification : constant Name_Id := N + 713; - Name_Specification_Exceptions : constant Name_Id := N + 714; - Name_Specification_Suffix : constant Name_Id := N + 715; - Name_Stack : constant Name_Id := N + 716; - Name_Switches : constant Name_Id := N + 717; - Name_Symbolic_Link_Supported : constant Name_Id := N + 718; - Name_Toolchain_Description : constant Name_Id := N + 719; - Name_Toolchain_Version : constant Name_Id := N + 720; - Name_Runtime_Library_Dir : constant Name_Id := N + 721; + Name_Ada_Roots : constant Name_Id := N + 618; + Name_Archive_Builder : constant Name_Id := N + 619; + Name_Archive_Indexer : constant Name_Id := N + 620; + Name_Archive_Suffix : constant Name_Id := N + 621; + Name_Binder : constant Name_Id := N + 622; + Name_Binder_Prefix : constant Name_Id := N + 623; + Name_Body_Suffix : constant Name_Id := N + 624; + Name_Builder : constant Name_Id := N + 625; + Name_Builder_Switches : constant Name_Id := N + 626; + Name_Compiler : constant Name_Id := N + 627; + Name_Compiler_Kind : constant Name_Id := N + 628; + Name_Config_Body_File_Name : constant Name_Id := N + 629; + Name_Config_Body_File_Name_Pattern : constant Name_Id := N + 630; + Name_Config_File_Switches : constant Name_Id := N + 631; + Name_Config_File_Unique : constant Name_Id := N + 632; + Name_Config_Spec_File_Name : constant Name_Id := N + 633; + Name_Config_Spec_File_Name_Pattern : constant Name_Id := N + 634; + Name_Cross_Reference : constant Name_Id := N + 635; + Name_Default_Language : constant Name_Id := N + 636; + Name_Default_Switches : constant Name_Id := N + 637; + Name_Dependency_Driver : constant Name_Id := N + 638; + Name_Dependency_File_Kind : constant Name_Id := N + 639; + Name_Dependency_Switches : constant Name_Id := N + 640; + Name_Driver : constant Name_Id := N + 641; + Name_Excluded_Source_Dirs : constant Name_Id := N + 642; + Name_Excluded_Source_Files : constant Name_Id := N + 643; + Name_Exec_Dir : constant Name_Id := N + 644; + Name_Executable : constant Name_Id := N + 645; + Name_Executable_Suffix : constant Name_Id := N + 646; + Name_Extends : constant Name_Id := N + 647; + Name_Externally_Built : constant Name_Id := N + 648; + Name_Finder : constant Name_Id := N + 649; + Name_Global_Configuration_Pragmas : constant Name_Id := N + 650; + Name_Global_Config_File : constant Name_Id := N + 651; + Name_Gnatls : constant Name_Id := N + 652; + Name_Gnatstub : constant Name_Id := N + 653; + Name_Implementation : constant Name_Id := N + 654; + Name_Implementation_Exceptions : constant Name_Id := N + 655; + Name_Implementation_Suffix : constant Name_Id := N + 656; + Name_Include_Switches : constant Name_Id := N + 657; + Name_Include_Path : constant Name_Id := N + 658; + Name_Include_Path_File : constant Name_Id := N + 659; + Name_Language_Kind : constant Name_Id := N + 660; + Name_Language_Processing : constant Name_Id := N + 661; + Name_Languages : constant Name_Id := N + 662; + Name_Library_Ali_Dir : constant Name_Id := N + 663; + Name_Library_Auto_Init : constant Name_Id := N + 664; + Name_Library_Auto_Init_Supported : constant Name_Id := N + 665; + Name_Library_Builder : constant Name_Id := N + 666; + Name_Library_Dir : constant Name_Id := N + 667; + Name_Library_GCC : constant Name_Id := N + 668; + Name_Library_Interface : constant Name_Id := N + 669; + Name_Library_Kind : constant Name_Id := N + 670; + Name_Library_Name : constant Name_Id := N + 671; + Name_Library_Major_Minor_Id_Supported : constant Name_Id := N + 672; + Name_Library_Options : constant Name_Id := N + 673; + Name_Library_Partial_Linker : constant Name_Id := N + 674; + Name_Library_Reference_Symbol_File : constant Name_Id := N + 675; + Name_Library_Src_Dir : constant Name_Id := N + 676; + Name_Library_Support : constant Name_Id := N + 677; + Name_Library_Symbol_File : constant Name_Id := N + 678; + Name_Library_Symbol_Policy : constant Name_Id := N + 679; + Name_Library_Version : constant Name_Id := N + 680; + Name_Library_Version_Switches : constant Name_Id := N + 681; + Name_Linker : constant Name_Id := N + 682; + Name_Linker_Executable_Option : constant Name_Id := N + 683; + Name_Linker_Lib_Dir_Option : constant Name_Id := N + 684; + Name_Linker_Lib_Name_Option : constant Name_Id := N + 685; + Name_Local_Config_File : constant Name_Id := N + 686; + Name_Local_Configuration_Pragmas : constant Name_Id := N + 687; + Name_Locally_Removed_Files : constant Name_Id := N + 688; + Name_Mapping_File_Switches : constant Name_Id := N + 689; + Name_Mapping_Spec_Suffix : constant Name_Id := N + 690; + Name_Mapping_Body_Suffix : constant Name_Id := N + 691; + Name_Metrics : constant Name_Id := N + 692; + Name_Naming : constant Name_Id := N + 693; + Name_Objects_Path : constant Name_Id := N + 694; + Name_Objects_Path_File : constant Name_Id := N + 695; + Name_Object_Dir : constant Name_Id := N + 696; + Name_Pic_Option : constant Name_Id := N + 697; + Name_Pretty_Printer : constant Name_Id := N + 698; + Name_Prefix : constant Name_Id := N + 699; + Name_Project : constant Name_Id := N + 700; + Name_Roots : constant Name_Id := N + 701; + Name_Required_Switches : constant Name_Id := N + 702; + Name_Run_Path_Option : constant Name_Id := N + 703; + Name_Runtime_Project : constant Name_Id := N + 704; + Name_Shared_Library_Minimum_Switches : constant Name_Id := N + 705; + Name_Shared_Library_Prefix : constant Name_Id := N + 706; + Name_Shared_Library_Suffix : constant Name_Id := N + 707; + Name_Separate_Suffix : constant Name_Id := N + 708; + Name_Source_Dirs : constant Name_Id := N + 709; + Name_Source_Files : constant Name_Id := N + 710; + Name_Source_List_File : constant Name_Id := N + 711; + Name_Spec : constant Name_Id := N + 712; + Name_Spec_Suffix : constant Name_Id := N + 713; + Name_Specification : constant Name_Id := N + 714; + Name_Specification_Exceptions : constant Name_Id := N + 715; + Name_Specification_Suffix : constant Name_Id := N + 716; + Name_Stack : constant Name_Id := N + 717; + Name_Switches : constant Name_Id := N + 718; + Name_Symbolic_Link_Supported : constant Name_Id := N + 719; + Name_Toolchain_Description : constant Name_Id := N + 720; + Name_Toolchain_Version : constant Name_Id := N + 721; + Name_Runtime_Library_Dir : constant Name_Id := N + 722; -- Other miscellaneous names used in front end - Name_Unaligned_Valid : constant Name_Id := N + 722; + Name_Unaligned_Valid : constant Name_Id := N + 723; -- Ada 2005 reserved words - First_2005_Reserved_Word : constant Name_Id := N + 723; - Name_Interface : constant Name_Id := N + 723; - Name_Overriding : constant Name_Id := N + 724; - Name_Synchronized : constant Name_Id := N + 725; - Last_2005_Reserved_Word : constant Name_Id := N + 725; + First_2005_Reserved_Word : constant Name_Id := N + 724; + Name_Interface : constant Name_Id := N + 724; + Name_Overriding : constant Name_Id := N + 725; + Name_Synchronized : constant Name_Id := N + 726; + Last_2005_Reserved_Word : constant Name_Id := N + 726; subtype Ada_2005_Reserved_Words is Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word; -- Mark last defined name for consistency check in Snames body - Last_Predefined_Name : constant Name_Id := N + 725; + Last_Predefined_Name : constant Name_Id := N + 726; --------------------------------------- -- Subtypes Defining Name Categories -- @@ -1498,6 +1499,7 @@ package Snames is Pragma_Unchecked_Union, Pragma_Unimplemented_Unit, Pragma_Universal_Aliasing, + Pragma_Unmodified, Pragma_Unreferenced, Pragma_Unreferenced_Objects, Pragma_Unreserve_All_Interrupts, diff --git a/gcc/ada/snames.h b/gcc/ada/snames.h index 131ed99..e8c94b5 100644 --- a/gcc/ada/snames.h +++ b/gcc/ada/snames.h @@ -367,17 +367,18 @@ extern unsigned char Get_Pragma_Id (int); #define Pragma_Unchecked_Union 148 #define Pragma_Unimplemented_Unit 149 #define Pragma_Universal_Aliasing 150 -#define Pragma_Unreferenced 151 -#define Pragma_Unreferenced_Objects 152 -#define Pragma_Unreserve_All_Interrupts 153 -#define Pragma_Volatile 154 -#define Pragma_Volatile_Components 155 -#define Pragma_Weak_External 156 -#define Pragma_AST_Entry 157 -#define Pragma_Fast_Math 158 -#define Pragma_Interface 159 -#define Pragma_Priority 160 -#define Pragma_Storage_Size 161 -#define Pragma_Storage_Unit 162 +#define Pragma_Unmodified 151 +#define Pragma_Unreferenced 152 +#define Pragma_Unreferenced_Objects 153 +#define Pragma_Unreserve_All_Interrupts 154 +#define Pragma_Volatile 155 +#define Pragma_Volatile_Components 156 +#define Pragma_Weak_External 157 +#define Pragma_AST_Entry 158 +#define Pragma_Fast_Math 159 +#define Pragma_Interface 160 +#define Pragma_Priority 161 +#define Pragma_Storage_Size 162 +#define Pragma_Storage_Unit 163 /* End of snames.h (C version of Snames package spec) */ |