if Is_By_Reference_Type (Etype (Formal)) then
- -- If the front-end does not perform full type layout, the actual
- -- may in fact be properly aligned but there is not enough front-end
- -- information to determine this. In that case gigi will emit an
- -- error if a copy is not legal, or generate the proper code.
- -- For other backends we report the error now.
+ -- If the front-end does not perform full type layout, the actual
+ -- may in fact be properly aligned but there is not enough front-
+ -- end information to determine this. In that case gigi will emit
+ -- an error if a copy is not legal, or generate the proper code.
+ -- For other backends we report the error now.
+
+ -- Seems wrong to be issuing an error in the expander, since it
+ -- will be missed in -gnatc mode ???
if Frontend_Layout_On_Target then
Error_Msg_N
begin
Set_Has_Completion (Subp, False);
- -- Set_Has_Delayed_Freeze (Subp);
Append_Freeze_Action (Subp, Bod);
-- The body now contains raise statements, so calls to it will
-- (Could we do better and remove the original body???)
if Distribution_Stub_Mode = Generate_Caller_Stub_Body
- and then Comes_From_Source (N)
- and then Nkind (Parent (N)) = N_Compilation_Unit
+ and then Comes_From_Source (N)
+ and then Nkind (Parent (N)) = N_Compilation_Unit
then
Needs_Body := False;
end if;
-- Here is a defence against a ludicrous number of instantiations
-- caused by a circular set of instantiation attempts.
- if Pending_Instantiations.Last >
- Hostparm.Max_Instantiations
- then
+ if Pending_Instantiations.Last > Hostparm.Max_Instantiations then
Error_Msg_N ("too many instantiations", N);
raise Unrecoverable_Error;
end if;
Insert_Before (N, Act_Decl);
Analyze (Act_Decl);
- -- For an instantiation that is a compilation unit, place declaration
- -- on current node so context is complete for analysis (including
- -- nested instantiations). If this is the main unit, the declaration
- -- eventually replaces the instantiation node. If the instance body
- -- is created later, it replaces the instance node, and the
- -- declaration is attached to it (see
- -- Build_Instance_Compilation_Unit_Nodes).
+ -- For an instantiation that is a compilation unit, place
+ -- declaration on current node so context is complete for analysis
+ -- (including nested instantiations). If this is the main unit,
+ -- the declaration eventually replaces the instantiation node.
+ -- If the instance body is created later, it replaces the
+ -- instance node, and the declaration is attached to it
+ -- (see Build_Instance_Compilation_Unit_Nodes).
else
if Cunit_Entity (Current_Sem_Unit) = Defining_Entity (N) then