Commit 2557e054 by Robert Dewar Committed by Arnaud Charlet

layout.adb, [...]: Minor reformatting.

2012-07-23  Robert Dewar  <dewar@adacore.com>

	* layout.adb, sem_prag.adb, sem.ads, freeze.adb,
	switch-m.adb, exp_disp.adb, system-vxworks-ppc.ads, exp_ch6.adb: Minor
	reformatting.

From-SVN: r189770
parent 63ed669f
2012-07-23 Robert Dewar <dewar@adacore.com>
* layout.adb, sem_prag.adb, sem.ads, freeze.adb,
switch-m.adb, exp_disp.adb, system-vxworks-ppc.ads, exp_ch6.adb: Minor
reformatting.
2012-07-23 Tristan Gingold <gingold@adacore.com> 2012-07-23 Tristan Gingold <gingold@adacore.com>
* gcc-interface/trans.c: (Handled_Sequence_Of_Statements_to_gnu): Set * gcc-interface/trans.c: (Handled_Sequence_Of_Statements_to_gnu): Set
......
...@@ -4835,8 +4835,8 @@ package body Exp_Ch6 is ...@@ -4835,8 +4835,8 @@ package body Exp_Ch6 is
Ret_Type := Etype (Subp); Ret_Type := Etype (Subp);
end if; end if;
-- Create temporaries for the actuals that are expressions, or that -- Create temporaries for the actuals that are expressions, or that are
-- are scalars and require copying to preserve semantics. -- scalars and require copying to preserve semantics.
F := First_Formal (Subp); F := First_Formal (Subp);
A := First_Actual (N); A := First_Actual (N);
...@@ -4850,9 +4850,7 @@ package body Exp_Ch6 is ...@@ -4850,9 +4850,7 @@ package body Exp_Ch6 is
-- prevent spurious warnings about overwriting for assignments to the -- prevent spurious warnings about overwriting for assignments to the
-- formal in the inlined code. -- formal in the inlined code.
if Is_Entity_Name (A) if Is_Entity_Name (A) and then Ekind (F) /= E_In_Parameter then
and then Ekind (F) /= E_In_Parameter
then
Set_Last_Assignment (Entity (A), Empty); Set_Last_Assignment (Entity (A), Empty);
end if; end if;
...@@ -4888,9 +4886,9 @@ package body Exp_Ch6 is ...@@ -4888,9 +4886,9 @@ package body Exp_Ch6 is
(not Is_Scalar_Type (Etype (A)) (not Is_Scalar_Type (Etype (A))
or else Ekind (Entity (A)) = E_Enumeration_Literal)) or else Ekind (Entity (A)) = E_Enumeration_Literal))
-- When the actual is an identifier and the corresponding formal -- When the actual is an identifier and the corresponding formal is
-- is used only once in the original body, the formal can be -- used only once in the original body, the formal can be substituted
-- substituted directly with the actual parameter. -- directly with the actual parameter.
or else (Nkind (A) = N_Identifier or else (Nkind (A) = N_Identifier
and then Formal_Is_Used_Once (F)) and then Formal_Is_Used_Once (F))
...@@ -4936,8 +4934,8 @@ package body Exp_Ch6 is ...@@ -4936,8 +4934,8 @@ package body Exp_Ch6 is
Set_Sloc (New_A, Sloc (N)); Set_Sloc (New_A, Sloc (N));
-- If the actual has a by-reference type, it cannot be copied, so -- If the actual has a by-reference type, it cannot be copied,
-- its value is captured in a renaming declaration. Otherwise -- so its value is captured in a renaming declaration. Otherwise
-- declare a local constant initialized with the actual. -- declare a local constant initialized with the actual.
-- We also use a renaming declaration for expressions of an array -- We also use a renaming declaration for expressions of an array
...@@ -5161,8 +5159,8 @@ package body Exp_Ch6 is ...@@ -5161,8 +5159,8 @@ package body Exp_Ch6 is
end if; end if;
end if; end if;
-- Analyze Blk with In_Inlined_Body set, to avoid spurious errors on -- Analyze Blk with In_Inlined_Body set, to avoid spurious errors
-- conflicting private views that Gigi would ignore. If this is a -- on conflicting private views that Gigi would ignore. If this is a
-- predefined unit, analyze with checks off, as is done in the non- -- predefined unit, analyze with checks off, as is done in the non-
-- inlined run-time units. -- inlined run-time units.
......
...@@ -7132,7 +7132,10 @@ package body Exp_Disp is ...@@ -7132,7 +7132,10 @@ package body Exp_Disp is
Set_Related_Type (DT_Ptr, Typ); Set_Related_Type (DT_Ptr, Typ);
-- Ensure that entities Prim_Ptr and Predef_Prims_Table_Ptr have -- Ensure that entities Prim_Ptr and Predef_Prims_Table_Ptr have
-- the decoration required by the backend -- the decoration required by the backend.
-- Odd comment, the back end cannot require anything not properly
-- documented in einfo! ???
Set_Is_Dispatch_Table_Entity (RTE (RE_Prim_Ptr)); Set_Is_Dispatch_Table_Entity (RTE (RE_Prim_Ptr));
Set_Is_Dispatch_Table_Entity (RTE (RE_Predef_Prims_Table_Ptr)); Set_Is_Dispatch_Table_Entity (RTE (RE_Predef_Prims_Table_Ptr));
......
...@@ -3031,6 +3031,8 @@ package body Freeze is ...@@ -3031,6 +3031,8 @@ package body Freeze is
-- the corresponding body, and therefore are not checked on an -- the corresponding body, and therefore are not checked on an
-- imported subprogram for which the body is not available. -- imported subprogram for which the body is not available.
-- Could consider generating a wrapper to take care of this???
if Is_Subprogram (E) if Is_Subprogram (E)
and then Is_Imported (E) and then Is_Imported (E)
and then Present (Contract (E)) and then Present (Contract (E))
......
...@@ -2460,15 +2460,14 @@ package body Layout is ...@@ -2460,15 +2460,14 @@ package body Layout is
elsif AAMP_On_Target elsif AAMP_On_Target
and then and then
((Ekind (E) = E_Access_Subprogram_Type ((Ekind (E) = E_Access_Subprogram_Type
and then Present (Enclosing_Subprogram (E))) and then Present (Enclosing_Subprogram (E)))
or else or else
(Ekind (E) = E_Anonymous_Access_Subprogram_Type (Ekind (E) = E_Anonymous_Access_Subprogram_Type
and then and then
(not Is_Local_Anonymous_Access (E) (not Is_Local_Anonymous_Access (E)
or else Present (Enclosing_Subprogram (E))))) or else Present (Enclosing_Subprogram (E)))))
then then
Init_Size (E, 2 * System_Address_Size); Init_Size (E, 2 * System_Address_Size);
else else
Init_Size (E, System_Address_Size); Init_Size (E, System_Address_Size);
end if; end if;
......
...@@ -449,7 +449,7 @@ package Sem is ...@@ -449,7 +449,7 @@ package Sem is
-- Pointer to name of last subprogram body in this scope. Used for -- Pointer to name of last subprogram body in this scope. Used for
-- testing proper alpha ordering of subprogram bodies in scope. -- testing proper alpha ordering of subprogram bodies in scope.
Save_Scope_Suppress : Suppress_Array; Save_Scope_Suppress : Suppress_Array;
-- Save contents of Scope_Suppress on entry -- Save contents of Scope_Suppress on entry
Save_Local_Suppress_Stack_Top : Suppress_Stack_Entry_Ptr; Save_Local_Suppress_Stack_Top : Suppress_Stack_Entry_Ptr;
......
...@@ -5620,9 +5620,7 @@ package body Sem_Prag is ...@@ -5620,9 +5620,7 @@ package body Sem_Prag is
-- If this is a first subtype, and the base type is distinct, -- If this is a first subtype, and the base type is distinct,
-- then also set the suppress flags on the base type. -- then also set the suppress flags on the base type.
if Is_First_Subtype (E) if Is_First_Subtype (E) and then Etype (E) /= E then
and then Etype (E) /= E
then
Suppress_Unsuppress_Echeck (Etype (E), C); Suppress_Unsuppress_Echeck (Etype (E), C);
end if; end if;
end Suppress_Unsuppress_Echeck; end Suppress_Unsuppress_Echeck;
......
...@@ -236,9 +236,9 @@ package body Switch.M is ...@@ -236,9 +236,9 @@ package body Switch.M is
-- One-letter switches -- One-letter switches
when 'a' | 'A' | 'b' | 'B' | 'c' | 'C' | 'E' | 'f' | when 'a' | 'A' | 'b' | 'B' | 'c' | 'C' | 'E' | 'f' |
'F' | 'g' | 'h' | 'H' | 'I' | 'L' | 'N' | 'F' | 'g' | 'h' | 'H' | 'I' | 'L' | 'N' | 'o' |
'o' | 'p' | 'P' | 'q' | 'Q' | 'r' | 's' | 'S' | 'p' | 'P' | 'q' | 'Q' | 'r' | 's' | 'S' | 't' |
't' | 'u' | 'U' | 'v' | 'x' | 'X' | 'Z' => 'u' | 'U' | 'v' | 'x' | 'X' | 'Z' =>
Storing (First_Stored) := C; Storing (First_Stored) := C;
Add_Switch_Component Add_Switch_Component
(Storing (Storing'First .. First_Stored)); (Storing (Storing'First .. First_Stored));
......
...@@ -115,6 +115,12 @@ package System is ...@@ -115,6 +115,12 @@ package System is
private private
-- Note: we are moving to a scheme where we more closely rely on the
-- VxWorks mechanisms to register exception tables. This change requests
-- it by default (-auto-register) and removes the incomplete circuitry
-- that was taking care of the registration as part of the Ada RTS
-- initialization.
pragma Linker_Options ("-crtbe" & ASCII.NUL & "-auto-register"); pragma Linker_Options ("-crtbe" & ASCII.NUL & "-auto-register");
-- Required by ZCX on VxWorks kernel -- Required by ZCX on VxWorks kernel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment