-- output.
procedure Write_Components (G : Library_Graph);
- pragma Inline (Write_Component);
+ pragma Inline (Write_Components);
-- Write all components of library graph G to standard output
procedure Write_Edges_To_Successors
-- (File); such accesses may cause Storage_Error to be raised.
function Data (Region : Mapped_Region) return Str_Access;
- pragma Inline (Data);
-- The data mapped in Region as requested. The result is an unconstrained
-- string, so you cannot use the usual 'First and 'Last attributes.
-- Instead, these are respectively 1 and Size.
function Data (File : Mapped_File) return Str_Access;
- pragma Inline (Data);
-- Likewise for the region contained in File
function Is_Mutable (Region : Mapped_Region) return Boolean;
then
Error_Msg_NE ("aspect% for & previously given#", N, Id);
else
- Error_Msg_NE ("pragma% for & duplicates pragma#", N, Id);
+ -- If -gnatwr is set, warn in case of a duplicate pragma
+ -- [No_]Inline which is suspicious but not an error, generate
+ -- an error for other pragmas.
+
+ if Nam_In (Pragma_Name (N), Name_Inline, Name_No_Inline) then
+ if Warn_On_Redundant_Constructs then
+ Error_Msg_NE
+ ("?r?pragma% for & duplicates pragma#", N, Id);
+ end if;
+ else
+ Error_Msg_NE ("pragma% for & duplicates pragma#", N, Id);
+ end if;
end if;
raise Pragma_Exit;
Applies := True;
else
+ -- Check for RM 13.1(9.2/4): If a [...] aspect_specification
+ -- is given that directly specifies an aspect of an entity,
+ -- then it is illegal to give another [...]
+ -- aspect_specification that directly specifies the same
+ -- aspect of the entity.
+ -- We only check Subp directly as per "directly specifies"
+ -- above and because the case of pragma Inline is really
+ -- special given its pre aspect usage.
+
+ Check_Duplicate_Pragma (Subp);
+ Record_Rep_Item (Subp, N);
+
Make_Inline (Subp);
-- For the pragma case, climb homonym chain. This is
while Present (Homonym (Subp))
and then Scope (Homonym (Subp)) = Current_Scope
loop
- Make_Inline (Homonym (Subp));
Subp := Homonym (Subp);
+ Make_Inline (Subp);
end loop;
end if;
end if;
-- New_Id is the corresponding new entity generated during Phase 1.
procedure Add_Pending_Itype (Assoc_Nod : Node_Id; Itype : Entity_Id);
- pragma Inline (Add_New_Entity);
+ pragma Inline (Add_Pending_Itype);
-- Add an entry in the NCT_Pending_Itypes which maps key Assoc_Nod to
-- value Itype. Assoc_Nod is the associated node of an itype. Itype is
-- an itype.
-- with the same mode.
procedure Next_Global (Node : in out Node_Id);
- pragma Inline (Next_Actual);
+ pragma Inline (Next_Global);
-- Next_Global (N) is equivalent to N := Next_Global (N). Note that we
-- inline this procedural form, but not the functional form above.
or else NT (N).Nkind = N_Aspect_Specification
or else NT (N).Nkind = N_Attribute_Definition_Clause
or else NT (N).Nkind = N_Enumeration_Representation_Clause
+ or else NT (N).Nkind = N_Null_Statement
or else NT (N).Nkind = N_Pragma
or else NT (N).Nkind = N_Record_Representation_Clause);
return Node5 (N);
or else NT (N).Nkind = N_Aspect_Specification
or else NT (N).Nkind = N_Attribute_Definition_Clause
or else NT (N).Nkind = N_Enumeration_Representation_Clause
+ or else NT (N).Nkind = N_Null_Statement
or else NT (N).Nkind = N_Pragma
or else NT (N).Nkind = N_Record_Representation_Clause);
Set_Node5 (N, Val); -- semantic field, no parent set
-- Next_Rep_Item (Node5-Sem)
-- Present in pragma nodes, attribute definition nodes, enumeration rep
- -- clauses, record rep clauses, aspect specification nodes. Used to link
- -- representation items that apply to an entity. See full description of
- -- First_Rep_Item field in Einfo for further details.
+ -- clauses, record rep clauses, aspect specification and null statement
+ -- nodes. Used to link representation items that apply to an entity. See
+ -- full description of First_Rep_Item field in Einfo for further details.
-- Next_Use_Clause (Node3-Sem)
-- While use clauses are active during semantic processing, they are
-- N_Null_Statement
-- Sloc points to NULL
+ -- Next_Rep_Item (Node5-Sem)
----------------
-- 5.1 Label --