when N_Attribute_Reference =>
Set_Do_Overflow_Check (N, False);
- when N_Function_Call =>
- Set_Do_Tag_Check (N, False);
-
when N_Op =>
Set_Do_Overflow_Check (N, False);
when N_Type_Conversion =>
Set_Do_Length_Check (N, False);
- Set_Do_Tag_Check (N, False);
Set_Do_Overflow_Check (N, False);
when others =>
-- that clients should generally not test this flag directly, but instead
-- use function Has_Unreferenced.
--- ??? this real description was clobbered
-
-- Has_Pragma_Unreferenced_Objects
-- Defined in all entities. Set if a valid pragma Unused applies to an
-- entity, indicating that warnings should be given if the entity is
--
-- Implementation limitation: Assoc_Node must be a statement. We can
-- generalize to expressions if there is a need but this is tricky to
- -- implement because of short-circuits (among other things).???
+ -- implement because of short-circuits (among other things).
procedure Insert_Declaration (N : Node_Id; Decl : Node_Id);
-- N must be a subexpression (Nkind in N_Subexpr). This is similar to
Discrete_Subtype_Definitions,
Discriminant_Specifications,
Discriminant_Type,
- Do_Accessibility_Check,
Do_Discriminant_Check,
Do_Division_Check,
Do_Length_Check,
Do_Overflow_Check,
Do_Range_Check,
Do_Storage_Check,
- Do_Tag_Check,
Elaborate_All_Desirable,
Elaborate_All_Present,
Elaborate_Desirable,
Ab (N_Subprogram_Call, N_Subexpr,
(Sm (Controlling_Argument, Node_Id),
- Sm (Do_Tag_Check, Flag),
Sm (First_Named_Actual, Node_Id),
Sm (Is_Elaboration_Checks_OK_Node, Flag),
Sm (Is_Elaboration_Warnings_OK_Node, Flag),
Sm (Do_Discriminant_Check, Flag),
Sm (Do_Length_Check, Flag),
Sm (Do_Overflow_Check, Flag),
- Sm (Do_Tag_Check, Flag),
Sm (Float_Truncate, Flag),
Sm (Rounded_Result, Flag)));
Sm (Componentwise_Assignment, Flag),
Sm (Do_Discriminant_Check, Flag),
Sm (Do_Length_Check, Flag),
- Sm (Do_Tag_Check, Flag),
Sm (Forwards_OK, Flag),
Sm (Has_Target_Names, Flag),
Sm (Is_Elaboration_Checks_OK_Node, Flag),
(Sy (Expression, Node_Id, Default_Empty),
Sm (By_Ref, Flag),
Sm (Comes_From_Extended_Return_Statement, Flag),
- Sm (Do_Tag_Check, Flag),
Sm (Procedure_To_Call, Node_Id),
Sm (Return_Statement_Entity, Node_Id),
Sm (Storage_Pool, Node_Id)));
(Sy (Return_Object_Declarations, List_Id),
Sy (Handled_Statement_Sequence, Node_Id, Default_Empty),
Sm (By_Ref, Flag),
- Sm (Do_Tag_Check, Flag),
Sm (Procedure_To_Call, Node_Id),
Sm (Return_Statement_Entity, Node_Id),
Sm (Storage_Pool, Node_Id)));
Sy (Parameter_Type, Node_Id),
Sy (Expression, Node_Id, Default_Empty),
Sm (Default_Expression, Node_Id),
- Sm (Do_Accessibility_Check, Flag),
Sm (More_Ids, Flag),
Sm (Prev_Ids, Flag)));
-- in the signature of an inherited operation must carry the derived type.
function Is_Subtype_Of (T1 : Entity_Id; T2 : Entity_Id) return Boolean;
- -- Checks whether T1 is any subtype of T2 directly or indirectly. Applies
- -- only to scalar subtypes???
+ -- Checks whether T1 is any subtype of T2 directly or indirectly
function Operator_Matches_Spec (Op, New_S : Entity_Id) return Boolean;
-- Used to resolve subprograms renaming operators, and calls to user
when N_Type_Conversion =>
if Do_Overflow_Check (Expr)
or else Do_Length_Check (Expr)
- or else Do_Tag_Check (Expr)
then
return False;
else
Ent : constant Entity_Id := Entity (Expr);
Sub : constant Entity_Id := Enclosing_Subprogram (Ent);
begin
- if Ekind (Ent) not in E_Variable | E_In_Out_Parameter then
+ if Ekind (Ent)
+ not in E_Variable | E_In_Out_Parameter | E_Out_Parameter
+ then
return False;
else
return Present (Sub) and then Sub = Current_Subprogram;
-- limited view must be treated in the same way.
function Is_Local_Variable_Reference (Expr : Node_Id) return Boolean;
- -- Determines whether Expr is a reference to a variable or IN OUT mode
- -- parameter of the current enclosing subprogram.
- -- Why are OUT parameters not considered here ???
+ -- Determines whether Expr is a reference to a variable or formal parameter
+ -- of mode OUT or IN OUT of the current enclosing subprogram.
function Is_Master (N : Node_Id) return Boolean;
-- Determine if the given node N constitutes a finalization master
procedure Propagate_Concurrent_Flags
(Typ : Entity_Id;
Comp_Typ : Entity_Id);
- -- Set Has_Task, Has_Protected and Has_Timing_Event on Typ when the flags
- -- are set on Comp_Typ. This follows the definition of these flags which
- -- are set (recursively) on any composite type which has a component marked
+ -- Set Has_Task, Has_Protected, and Has_Timing_Event on Typ when the flags
+ -- are set on Comp_Typ. This follows the definition of these flags, which
+ -- are set (recursively) on any composite type that has a component marked
-- by one of these flags. This procedure can only set flags for Typ, and
-- never clear them. Comp_Typ is the type of a component or a parent.
procedure Propagate_Invariant_Attributes
(Typ : Entity_Id;
From_Typ : Entity_Id);
- -- Inherit all invariant-related attributes form type From_Typ. Typ is the
+ -- Inherit all invariant-related attributes from type From_Typ. Typ is the
-- destination type.
procedure Propagate_Predicate_Attributes
(Typ : Entity_Id;
From_Typ : Entity_Id);
- -- Inherit some predicate-related attributes form type From_Typ. Typ is the
- -- destination type. Probably to be completed with more attributes???
+ -- Inherit predicate functions and Has_Predicates flag from type From_Typ.
+ -- Typ is the destination type.
procedure Record_Possible_Part_Of_Reference
(Var_Id : Entity_Id;
procedure Change_Conversion_To_Unchecked (N : Node_Id) is
begin
Set_Do_Overflow_Check (N, False);
- Set_Do_Tag_Check (N, False);
Set_Do_Length_Check (N, False);
Mutate_Nkind (N, N_Unchecked_Type_Conversion);
end Change_Conversion_To_Unchecked;
-- The following flag fields appear in various nodes:
- -- Do_Accessibility_Check
-- Do_Discriminant_Check
-- Do_Length_Check
-- Do_Storage_Check
- -- Do_Tag_Check
-- These flags are used in some specific cases by the front end, either
-- during semantic analysis or during expansion, and cannot be expected
-- Present in N_Raise_Expression nodes that appear in the body of the
-- special predicateM function used to test a predicate in the context
-- of a membership test, where raise expression results in returning a
- -- value of False rather than raising an exception.???obsolete flag
+ -- value of False rather than raising an exception.
-- Corresponding_Aspect
-- Present in N_Pragma node. Used to point back to the source aspect from
-- discriminant checking functions are constructed. The purpose is to
-- avoid attempting to set these functions more than once.
- -- Do_Accessibility_Check
- -- This flag is set on N_Parameter_Specification nodes to indicate
- -- that an accessibility check is required for the parameter. It is
- -- not yet decided who takes care of this check???.
-
-- Do_Discriminant_Check
-- This flag is set on N_Selected_Component nodes to indicate that a
-- discriminant check is required using the discriminant check routine
-- to the runtime routine. The N_Subprogram_Body case is handled by the
-- backend, and all the semantics does is set the flag.
- -- Do_Tag_Check
- -- This flag is set on an N_Assignment_Statement, N_Function_Call,
- -- N_Procedure_Call_Statement, N_Type_Conversion,
- -- N_Simple_Return_Statement, or N_Extended_Return_Statement
- -- node to indicate that the tag check can be suppressed. It is not
- -- yet decided how this flag is used???.
-
-- Elaborate_Present
-- This flag is set in the N_With_Clause node to indicate that pragma
-- Elaborate pragma appears for the with'ed units.
-- Do_Discriminant_Check
-- Do_Length_Check
-- Float_Truncate
- -- Do_Tag_Check
-- Conversion_OK
-- Do_Overflow_Check
-- Rounded_Result
-- No_Ctrl_Actions
-- Has_Target_Names
-- Is_Elaboration_Code
- -- Do_Tag_Check
-- Componentwise_Assignment
-- Suppress_Assignment_Checks
-- Null_Exclusion_Present
-- Parameter_Type subtype mark or access definition
-- Expression (set to Empty if no default expression present)
- -- Do_Accessibility_Check
-- More_Ids (set to False if no more identifiers in list)
-- Prev_Ids (set to False if no previous identifiers in list)
-- Default_Expression
-- Is_SPARK_Mode_On_Node
-- Is_Elaboration_Warnings_OK_Node
-- No_Elaboration_Check
- -- Do_Tag_Check
-- Is_Known_Guaranteed_ABE
-- plus fields for expression
-- Is_Elaboration_Warnings_OK_Node
-- No_Elaboration_Check
-- Is_Expanded_Build_In_Place_Call
- -- Do_Tag_Check
-- No_Side_Effect_Removal
-- Is_Known_Guaranteed_ABE
-- plus fields for expression
-- Expression (set to Empty if no expression present)
-- Storage_Pool
-- Procedure_To_Call
- -- Do_Tag_Check
-- By_Ref
-- Comes_From_Extended_Return_Statement
-- Handled_Statement_Sequence (set to Empty if not present)
-- Storage_Pool
-- Procedure_To_Call
- -- Do_Tag_Check
-- By_Ref
-- Note: Return_Statement_Entity points to an E_Return_Statement.
-- this flag is False, and the use of aggregates is not permitted.
Support_Atomic_Primitives_On_Target : Boolean := False;
- -- If this flag is True, then the back-end support GCC built-in atomic
- -- operations for memory model such as atomic load or atomic compare
+ -- If this flag is True, then the back end supports GCC built-in atomic
+ -- operations for memory model, such as atomic load or atomic compare
-- exchange (see the GCC manual for more information). If the flag is
- -- False, then the back-end doesn't provide this support. Note this flag is
- -- set to True only if the target supports all atomic primitives up to 64
- -- bits. ??? To be modified.
+ -- False, then the back end doesn't provide this support. Note that this
+ -- flag is set to True only if the target supports all atomic primitives
+ -- up to 64 bits.
Support_Composite_Assign_On_Target : Boolean := True;
-- The assignment of composite objects other than small records and