diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2019-07-03 08:14:43 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-07-03 08:14:43 +0000 |
commit | b5c8da6bac845e685236eeedc02f0814c05ed42f (patch) | |
tree | a092ccbb99ba45e9d08af7fdc8a5c720eb75f418 /gcc | |
parent | c4487c3be84e0b892aeb61f30435638c6d94a8ab (diff) | |
download | gcc-b5c8da6bac845e685236eeedc02f0814c05ed42f.zip gcc-b5c8da6bac845e685236eeedc02f0814c05ed42f.tar.gz gcc-b5c8da6bac845e685236eeedc02f0814c05ed42f.tar.bz2 |
[Ada] Minor reformatting
2019-07-03 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* bindgen.adb, inline.adb, layout.adb, sem_ch12.adb,
sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting.
From-SVN: r272973
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/bindgen.adb | 2 | ||||
-rw-r--r-- | gcc/ada/inline.adb | 36 | ||||
-rw-r--r-- | gcc/ada/layout.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 10 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 13 | ||||
-rw-r--r-- | gcc/ada/sem_ch7.adb | 4 | ||||
-rw-r--r-- | gcc/ada/styleg.adb | 8 |
8 files changed, 45 insertions, 35 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 750100e..7879ba2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-07-03 Hristian Kirtchev <kirtchev@adacore.com> + + * bindgen.adb, inline.adb, layout.adb, sem_ch12.adb, + sem_ch13.adb, sem_ch7.adb, styleg.adb: Minor reformatting. + 2019-07-03 Bob Duff <duff@adacore.com> * par-ch3.adb (P_Defining_Identifier): Call diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 9efc873..5cc3ea2 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -1811,7 +1811,7 @@ package body Bindgen is -- with a pragma Volatile in order to tell the compiler to preserve -- this variable at any level of optimization. - -- CodePeer and CCG do not need this extra code on the other hand. + -- CodePeer and CCG do not need this extra code on the other hand if Bind_Main_Program and then not CodePeer_Mode diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index ae1c217..8672105 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -2381,16 +2381,16 @@ package body Inline is -- When generating C code, declare _Result, which may be used in the -- inlined _Postconditions procedure to verify the return value. - procedure Make_Loop_Labels_Unique (Stats : Node_Id); - -- When compiling for CCG and performing front-end inlining, replace - -- loop names and references to them so that they do not conflict - -- with homographs in the current subprogram. - procedure Make_Exit_Label; -- Build declaration for exit label to be used in Return statements, -- sets Exit_Lab (the label node) and Lab_Decl (corresponding implicit -- declaration). Does nothing if Exit_Lab already set. + procedure Make_Loop_Labels_Unique (HSS : Node_Id); + -- When compiling for CCG and performing front-end inlining, replace + -- loop names and references to them so that they do not conflict with + -- homographs in the current subprogram. + function Process_Formals (N : Node_Id) return Traverse_Result; -- Replace occurrence of a formal with the corresponding actual, or the -- thunk generated for it. Replace a return statement with an assignment @@ -2483,9 +2483,7 @@ package body Inline is -- Make_Loop_Labels_Unique -- ----------------------------- - procedure Make_Loop_Labels_Unique (Stats : Node_Id) is - S : Node_Id; - + procedure Make_Loop_Labels_Unique (HSS : Node_Id) is function Process_Loop (N : Node_Id) return Traverse_Result; ------------------ @@ -2499,8 +2497,7 @@ package body Inline is if Nkind (N) = N_Loop_Statement and then Present (Identifier (N)) then - - -- Create new external name for loop. and update the + -- Create new external name for loop and update the -- corresponding entity. Id := Entity (Identifier (N)); @@ -2510,9 +2507,8 @@ package body Inline is elsif Nkind (N) = N_Exit_Statement and then Present (Name (N)) then - - -- The exit statement must name an enclosing loop, whose - -- name has already been updated. + -- The exit statement must name an enclosing loop, whose name + -- has already been updated. Set_Chars (Name (N), Chars (Entity (Name (N)))); end if; @@ -2522,12 +2518,18 @@ package body Inline is procedure Update_Loop_Names is new Traverse_Proc (Process_Loop); + -- Local variables + + Stmt : Node_Id; + + -- Start of processing for Make_Loop_Labels_Unique + begin if Modify_Tree_For_C then - S := First (Statements (Stats)); - while Present (S) loop - Update_Loop_Names (S); - Next (S); + Stmt := First (Statements (HSS)); + while Present (Stmt) loop + Update_Loop_Names (Stmt); + Next (Stmt); end loop; end if; end Make_Loop_Labels_Unique; diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index 5637946..f8e9099 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -463,7 +463,7 @@ package body Layout is and then Known_Static_Esize (CT) and then not (Known_Alignment (CT) and then Alignment_In_Bits (CT) > - Standard_Long_Long_Integer_Size) + Standard_Long_Long_Integer_Size) then declare S : constant Uint := Esize (CT); diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 9ddfc97..2427364 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -6198,8 +6198,8 @@ package body Sem_Ch12 is function Is_Defaulted (Param : Entity_Id) return Boolean; -- If the formql package has partly box-initialized formals, skip -- conformace check for these formals. Previously the code assumed - -- that boc initialization for a formal package applied to all - -- its formal parameters. + -- that boc initialization for a formal package applied to all its + -- formal parameters. function Same_Instantiated_Constant (E1, E2 : Entity_Id) return Boolean; -- The formal may come from a nested formal package, and the actual may @@ -6257,9 +6257,11 @@ package body Sem_Ch12 is function Is_Defaulted (Param : Entity_Id) return Boolean is Assoc : Node_Id; + begin - Assoc := First (Generic_Associations - (Parent (Associated_Formal_Package (Actual_Pack)))); + Assoc := + First (Generic_Associations (Parent + (Associated_Formal_Package (Actual_Pack)))); while Present (Assoc) loop if Nkind (Assoc) = N_Others_Choice then diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index ffd6f23..234177f 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -9328,8 +9328,8 @@ package body Sem_Ch13 is Analyze (End_Decl_Expr); Set_Is_Frozen (Ent, True); - -- If the end of declarations comes before any other freeze - -- point, the Freeze_Expr is not analyzed: no check needed. + -- If the end of declarations comes before any other freeze point, + -- the Freeze_Expr is not analyzed: no check needed. if Analyzed (Freeze_Expr) and then not In_Instance then Check_Overloaded_Name; @@ -9340,13 +9340,10 @@ package body Sem_Ch13 is -- All other cases else + -- In a generic context freeze nodes are not always generated, so + -- analyze the expression now. - -- In a generic context freeze nodes are not always generated, - -- so analyze the expression now. - - if not Analyzed (Freeze_Expr) - and then Inside_A_Generic - then + if not Analyzed (Freeze_Expr) and then Inside_A_Generic then Preanalyze (Freeze_Expr); end if; diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index a1b98f0..6f5126e 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -401,7 +401,7 @@ package body Sem_Ch7 is if not Generate_C_Code and then (Is_Inlined (Decl_Id) - or else Has_Pragma_Inline (Decl_Id)) + or else Has_Pragma_Inline (Decl_Id)) then Has_Referencer_Of_Non_Subprograms := True; @@ -423,7 +423,7 @@ package body Sem_Ch7 is if not Generate_C_Code and then (Is_Inlined (Decl_Id) - or else Has_Pragma_Inline (Decl_Id)) + or else Has_Pragma_Inline (Decl_Id)) then Has_Referencer_Of_Non_Subprograms := True; diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb index fc2364b..375664b 100644 --- a/gcc/ada/styleg.adb +++ b/gcc/ada/styleg.adb @@ -618,14 +618,18 @@ package body Styleg is begin if Style_Check_Mixed_Case_Decls then case Determine_Token_Casing is - when All_Upper_Case | All_Lower_Case => + when All_Lower_Case + | All_Upper_Case + => Error_Msg_SC -- CODEFIX ("(style) bad capitalization, mixed case required"); -- The Unknown case is something like A_B_C, which is both all -- caps and mixed case. - when Mixed_Case | Unknown => + when Mixed_Case + | Unknown + => null; -- OK end case; end if; |