From 09a078a19d3159edcc0e08138721677e219803ac Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Thu, 25 Apr 2013 10:09:35 +0000 Subject: sem_ch7.adb, [...]: Minor reformatting. 2013-04-25 Robert Dewar * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl, snames.ads-tmpl: Minor reformatting. From-SVN: r198281 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/einfo.adb | 3 +-- gcc/ada/repinfo.adb | 3 --- gcc/ada/sem_ch7.adb | 25 +++++++++++-------------- gcc/ada/snames.adb-tmpl | 4 ++-- gcc/ada/snames.ads-tmpl | 2 +- 6 files changed, 20 insertions(+), 22 deletions(-) (limited to 'gcc/ada') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index eadf65bb..fe5113a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2013-04-25 Robert Dewar + + * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl, + snames.ads-tmpl: Minor reformatting. + 2013-04-25 Thomas Quinot * sem_ch7.adb: Minor reformatting. diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 50735a3..0381548b 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -6796,8 +6796,7 @@ package body Einfo is function Is_Wrapper_Package (Id : E) return B is begin - return (Ekind (Id) = E_Package - and then Present (Related_Instance (Id))); + return (Ekind (Id) = E_Package and then Present (Related_Instance (Id))); end Is_Wrapper_Package; ----------------- diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb index 1c0222f..a907c7b 100644 --- a/gcc/ada/repinfo.adb +++ b/gcc/ada/repinfo.adb @@ -458,7 +458,6 @@ package body Repinfo is and then Present (Corresponding_Spec (Find_Declaration (Ent))) then E := First_Entity (Corresponding_Spec (Find_Declaration (Ent))); - while Present (E) loop if Is_Subprogram (E) and then @@ -727,7 +726,6 @@ package body Repinfo is Form := First_Formal (Ent); while Present (Form) loop Get_Unqualified_Decoded_Name_String (Chars (Form)); - while Name_Len <= Plen loop Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := ' '; @@ -1346,7 +1344,6 @@ package body Repinfo is when Discrim_Val => declare Sub : constant Int := UI_To_Int (Node.Op1); - begin pragma Assert (Sub in D'Range); return D (Sub); diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index fcd8769..59d566a 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -557,6 +557,7 @@ package body Sem_Ch7 is and then Ekind (Entity (N)) = E_Constant then V := Constant_Value (Entity (N)); + if Present (V) and then not Compile_Time_Known_Value_Or_Aggr (V) then @@ -1166,7 +1167,7 @@ package body Sem_Ch7 is while Present (Inst_Par) and then Inst_Par /= Standard_Standard and then (not In_Open_Scopes (Inst_Par) - or else not In_Private_Part (Inst_Par)) + or else not In_Private_Part (Inst_Par)) loop Install_Private_Declarations (Inst_Par); Set_Use (Private_Declarations @@ -1660,8 +1661,8 @@ package body Sem_Ch7 is and then Present (DTC_Entity (New_Op)) and then Present (DTC_Entity (Prim_Op)) then - pragma Assert (DT_Position (New_Op) - = DT_Position (Prim_Op)); + pragma Assert + (DT_Position (New_Op) = DT_Position (Prim_Op)); null; end if; @@ -1860,9 +1861,8 @@ package body Sem_Ch7 is Set_Is_Potentially_Use_Visible (Priv, Is_Potentially_Use_Visible (Node (Priv_Elmt))); - -- Within a child unit, recurse, except in generic child - -- unit, which (unfortunately) handle private_dependents - -- separately. + -- Within a child unit, recurse, except in generic child unit, + -- which (unfortunately) handle private_dependents separately. if Is_Priv and then Is_Child_Unit (Cunit_Entity (Current_Sem_Unit)) @@ -2019,7 +2019,7 @@ package body Sem_Ch7 is return In_Open_Scopes (S) or else (Is_Generic_Instance (Current_Scope) - and then Scope (Dep) = Scope (Current_Scope)); + and then Scope (Dep) = Scope (Current_Scope)); else return True; end if; @@ -2317,8 +2317,7 @@ package body Sem_Ch7 is Check_Conventions (Id); end if; - if (Ekind (Id) = E_Private_Type - or else Ekind (Id) = E_Limited_Private_Type) + if Ekind_In (Id, E_Private_Type, E_Limited_Private_Type) and then No (Full_View (Id)) and then not Is_Generic_Type (Id) and then not Is_Derived_Type (Id) @@ -2463,8 +2462,6 @@ package body Sem_Ch7 is ("full view of type must be definite subtype", Full); end if; - Priv_Elmt := First_Elmt (Private_Dependents (Id)); - -- Swap out the subtypes and derived types of Id that -- were compiled in this scope, or installed previously -- by Install_Private_Declarations. @@ -2473,6 +2470,7 @@ package body Sem_Ch7 is -- field which may be empty due to a swap by a previous call to -- End_Package_Scope (e.g. from the freezing mechanism). + Priv_Elmt := First_Elmt (Private_Dependents (Id)); while Present (Priv_Elmt) loop Priv_Sub := Node (Priv_Elmt); @@ -2552,7 +2550,7 @@ package body Sem_Ch7 is if Etype (Subp) = Id or else (Is_Class_Wide_Type (Etype (Subp)) - and then Etype (Etype (Subp)) = Id) + and then Etype (Etype (Subp)) = Id) then Error_Msg_NE ("type& must be completed in the private part", @@ -2565,8 +2563,7 @@ package body Sem_Ch7 is end; elsif not Is_Child_Unit (Id) - and then (not Is_Private_Type (Id) - or else No (Full_View (Id))) + and then (not Is_Private_Type (Id) or else No (Full_View (Id))) then Set_Is_Hidden (Id); Set_Is_Potentially_Use_Visible (Id, False); diff --git a/gcc/ada/snames.adb-tmpl b/gcc/ada/snames.adb-tmpl index f79e481..5a6cfba 100644 --- a/gcc/ada/snames.adb-tmpl +++ b/gcc/ada/snames.adb-tmpl @@ -147,8 +147,8 @@ package body Snames is case N is when Name_Ada => return Convention_Ada; when Name_Ada_Pass_By_Copy => return Convention_Ada_Pass_By_Copy; - when Name_Ada_Pass_By_Reference => - return Convention_Ada_Pass_By_Reference; + when Name_Ada_Pass_By_Reference => return + Convention_Ada_Pass_By_Reference; when Name_Assembler => return Convention_Assembler; when Name_C => return Convention_C; when Name_CIL => return Convention_CIL; diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index 2ddae4d..2e5f42b 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -1625,7 +1625,7 @@ package Snames is type Convention_Id is ( -- The native-to-Ada (non-foreign) conventions come first. These include - -- the ones defined in the RM, plus Stubbed. + -- the ones defined in the RM, plus Ghost and Stubbed. Convention_Ada, Convention_Intrinsic, -- cgit v1.1