summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/checks.adb2
-rw-r--r--gcc/ada/exp_ch4.adb18
-rw-r--r--gcc/ada/exp_dist.adb17
-rw-r--r--gcc/ada/exp_prag.adb3
-rw-r--r--gcc/ada/expander.adb8
-rw-r--r--gcc/ada/freeze.adb10
-rw-r--r--gcc/ada/g-arrspl.adb4
-rw-r--r--gcc/ada/gnat1drv.adb3
-rw-r--r--gcc/ada/sem_aggr.adb7
-rw-r--r--gcc/ada/sem_aux.adb2
-rw-r--r--gcc/ada/sem_ch10.adb2
-rw-r--r--gcc/ada/sem_ch12.adb6
-rw-r--r--gcc/ada/sem_ch6.adb9
-rw-r--r--gcc/ada/sem_ch8.adb3
-rw-r--r--gcc/ada/sem_prag.adb2
-rw-r--r--gcc/ada/sinfo.ads10
17 files changed, 55 insertions, 58 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 1908f656840..f0f8471d4a0 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-20 Robert Dewar <dewar@adacore.com>
+
+ * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
+ checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
+ expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
+ sem_ch8.adb, exp_dist.adb: Minor reformatting.
+
2014-01-20 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 4801c126e9f..4a3ce980f51 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -6290,7 +6290,7 @@ package body Checks is
-- enhanced to check for an always True value in the condition and to
-- generate a compilation warning???
- if not Expander_Active or else not Checks_On then
+ if not Expander_Active or not Checks_On then
return;
end if;
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index ad65378cffb..32d430b2ee2 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -12262,12 +12262,11 @@ package body Exp_Ch4 is
while Present (Par) loop
if Par = Wrapped_Node
- or else
- Nkind_In (Par, N_Assignment_Statement,
- N_Object_Declaration,
- N_Pragma,
- N_Procedure_Call_Statement,
- N_Simple_Return_Statement)
+ or else Nkind_In (Par, N_Assignment_Statement,
+ N_Object_Declaration,
+ N_Pragma,
+ N_Procedure_Call_Statement,
+ N_Simple_Return_Statement)
then
Hook_Context := Par;
goto Hook_Context_Found;
@@ -12303,13 +12302,14 @@ package body Exp_Ch4 is
Finalize_Always :=
not (In_Cond_Expr
- or else
- Nkind_In (Original_Node (N), N_Case_Expression,
- N_If_Expression));
+ or else
+ Nkind_In (Original_Node (N), N_Case_Expression,
+ N_If_Expression));
declare
Loc : constant Source_Ptr := Sloc (N);
Temp : constant Entity_Id := Make_Temporary (Loc, 'E', N);
+
begin
Append_To (Actions (N),
Make_Object_Declaration (Loc,
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
index 068a950ba11..22d6873f1dd 100644
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -9839,7 +9839,7 @@ package body Exp_Dist is
declare
Constrained : constant Boolean :=
- not Transmit_As_Unconstrained (Typ);
+ not Transmit_As_Unconstrained (Typ);
procedure TA_Ary_Add_Process_Element
(Stmts : List_Id;
@@ -9889,7 +9889,7 @@ package body Exp_Dist is
begin
Set_Expression (Any_Decl,
Make_Function_Call (Loc,
- Name =>
+ Name =>
New_Occurrence_Of (RTE (RE_Create_Any), Loc),
Parameter_Associations => New_List (Result_TC)));
Result_TC := Empty;
@@ -9899,9 +9899,9 @@ package body Exp_Dist is
for J in 1 .. Number_Dimensions (Typ) loop
Append_To (Stms,
Make_Procedure_Call_Statement (Loc,
- Name =>
- New_Occurrence_Of (
- RTE (RE_Add_Aggregate_Element), Loc),
+ Name =>
+ New_Occurrence_Of
+ (RTE (RE_Add_Aggregate_Element), Loc),
Parameter_Associations => New_List (
New_Occurrence_Of (Any, Loc),
Build_To_Any_Call (Loc,
@@ -9949,10 +9949,8 @@ package body Exp_Dist is
Append_To (Decls,
Make_Object_Declaration (Loc,
- Defining_Identifier =>
- Strm,
- Aliased_Present =>
- True,
+ Defining_Identifier => Strm,
+ Aliased_Present => True,
Object_Definition =>
New_Occurrence_Of (RTE (RE_Buffer_Stream_Type), Loc)));
@@ -9964,6 +9962,7 @@ package body Exp_Dist is
declare
Attr_Name : Name_Id;
+
begin
if Transmit_As_Unconstrained (Typ) then
Attr_Name := Name_Output;
diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb
index a1bb03ca78d..976e0ea9bc1 100644
--- a/gcc/ada/exp_prag.adb
+++ b/gcc/ada/exp_prag.adb
@@ -639,7 +639,7 @@ package body Exp_Prag is
Expression => Make_Identifier (Loc, Chars (Dum))),
Make_Pragma_Argument_Association (Loc,
- Chars => Name_External_Name,
+ Chars => Name_External_Name,
Expression => Relocate_Node (Rtti_Name))))));
Rewrite (Expression (Foreign_Data),
@@ -654,7 +654,6 @@ package body Exp_Prag is
else
null;
-
end if;
end Expand_Pragma_Import_Or_Interface;
diff --git a/gcc/ada/expander.adb b/gcc/ada/expander.adb
index 1fd1bc8a9ed..760c26457dd 100644
--- a/gcc/ada/expander.adb
+++ b/gcc/ada/expander.adb
@@ -84,14 +84,14 @@ package body Expander is
and then not (Inside_A_Generic and then Expander_Active));
-- There are three reasons for the Expander_Active flag to be false
- --
+
-- The first is when are not generating code. In this mode the
-- Full_Analysis flag indicates whether we are performing a complete
-- analysis, in which case Full_Analysis = True or a pre-analysis in
-- which case Full_Analysis = False. See the spec of Sem for more info
-- on this. Additionally, the GNATprove_Mode flag indicates that a light
-- expansion for formal verification should be used.
- --
+
-- The second reason for the Expander_Active flag to be False is that
-- we are performing a pre-analysis. During pre-analysis all expansion
-- activity is turned off to make sure nodes are semantically decorated
@@ -111,9 +111,7 @@ package body Expander is
if not (Expander_Active or (Full_Analysis and GNATprove_Mode)) then
Set_Analyzed (N, Full_Analysis);
- if Serious_Errors_Detected > 0
- and then Scope_Is_Transient
- then
+ if Serious_Errors_Detected > 0 and then Scope_Is_Transient then
Scope_Stack.Table
(Scope_Stack.Last).Actions_To_Be_Wrapped_Before := No_List;
Scope_Stack.Table
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 122d6b23cf6..6c283e4fdbf 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -1875,14 +1875,16 @@ package body Freeze is
if Ada_Version < Ada_2012 then
Error_Msg_N
("current instance must be a limited type",
- Prefix (N));
+ Prefix (N));
else
Error_Msg_N
- ("current instance must be an immutably limited " &
- "type (RM-2012, 7.5 (8.1/3))",
- Prefix (N));
+ ("current instance must be an immutably limited "
+ & "type (RM-2012, 7.5 (8.1/3))",
+ Prefix (N));
end if;
+
return Abandon;
+
else
return OK;
end if;
diff --git a/gcc/ada/g-arrspl.adb b/gcc/ada/g-arrspl.adb
index 82b42b1eba2..2984bb8ed67 100644
--- a/gcc/ada/g-arrspl.adb
+++ b/gcc/ada/g-arrspl.adb
@@ -337,8 +337,8 @@ package body GNAT.Array_Split is
raise Index_Error;
else
- return S.D.Source
- (S.D.Slices (Index).Start .. S.D.Slices (Index).Stop);
+ return
+ S.D.Source (S.D.Slices (Index).Start .. S.D.Slices (Index).Stop);
end if;
end Slice;
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index c0ebcfcb6eb..d380468669c 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -1262,8 +1262,7 @@ begin
-- same as the object file produced for compilation.
Write_ALI (Object => (Back_End_Mode = Generate_Object
- or else
- GNATprove_Mode));
+ or else GNATprove_Mode));
if not Compilation_Errors then
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 73ebeeb7204..8593d025786 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -459,9 +459,7 @@ package body Sem_Aggr is
-- added in the tree, so that the formal verification can rely on those
-- to be present.
- if not (Expander_Active or GNATprove_Mode)
- or In_Spec_Expression
- then
+ if not (Expander_Active or GNATprove_Mode) or In_Spec_Expression then
return;
end if;
@@ -1585,7 +1583,7 @@ package body Sem_Aggr is
Value := Expr_Value (From);
-- If expression From is something like Some_Type'Val (10) then
- -- Value = 10
+ -- Value = 10.
elsif Nkind (From) = N_Attribute_Reference
and then Attribute_Name (From) = Name_Val
@@ -1682,7 +1680,6 @@ package body Sem_Aggr is
(Expr, Nxt_Ind, Nxt_Ind_Constr, Component_Typ, Others_Allowed);
else
-
-- If it's "... => <>", nothing to resolve
if Nkind (Expr) = N_Component_Association then
diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb
index 12c20ac6126..d95af4f82bb 100644
--- a/gcc/ada/sem_aux.adb
+++ b/gcc/ada/sem_aux.adb
@@ -103,6 +103,8 @@ package body Sem_Aux is
then
return Class_Wide_Type (Non_Limited_View (Etype (Ent)));
+ -- In all other cases, return entity unchanged
+
else
return Ent;
end if;
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 23083cddd88..bc4deef0494 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -3066,7 +3066,7 @@ package body Sem_Ch10 is
and then Nkind (Original_Node (Unit)) = N_Package_Instantiation
then
return Defining_Entity
- (Specification (Instance_Spec (Original_Node (Unit))));
+ (Specification (Instance_Spec (Original_Node (Unit))));
elsif Nkind (Unit) = N_Package_Instantiation then
return Defining_Entity (Specification (Instance_Spec (Unit)));
else
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index f509ba460ca..e0276a6be59 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -3611,8 +3611,7 @@ package body Sem_Ch12 is
-- Save the instantiation node, for subsequent instantiation of the
-- body, if there is one and we are generating code for the current
- -- unit. Mark the unit as having a body, to avoid a premature error
- -- message.
+ -- unit. Mark unit as having a body (avoids premature error message).
-- We instantiate the body if we are generating code, if we are
-- generating cross-reference information, or if we are building
@@ -4390,8 +4389,7 @@ package body Sem_Ch12 is
or else Is_Inlined (Subp)
or else Is_Inlined (Alias (Subp)))
- -- Must be generating code or analyzing code in ASIS mode or GNATprove
- -- mode.
+ -- Must be generating code or analyzing code in ASIS/GNATprove mode
and then (Operating_Mode = Generate_Code
or else (Operating_Mode = Check_Semantics
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 4ad72dffe2d..a7cadbd97df 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -1276,7 +1276,6 @@ package body Sem_Ch6 is
return;
else
-
-- Resolve the types of the formals now, because the freeze point
-- may appear in a different context, e.g. an instantiation.
@@ -1362,13 +1361,11 @@ package body Sem_Ch6 is
Par : constant Node_Id := Parent (N);
begin
- if (Nkind (Par) = N_Function_Call
- and then N = Name (Par))
+ if (Nkind (Par) = N_Function_Call and then N = Name (Par))
or else Nkind (Par) = N_Function_Instantiation
- or else (Nkind (Par) = N_Indexed_Component
- and then N = Prefix (Par))
+ or else (Nkind (Par) = N_Indexed_Component and then N = Prefix (Par))
or else (Nkind (Par) = N_Pragma_Argument_Association
- and then not Is_Pragma_String_Literal (Par))
+ and then not Is_Pragma_String_Literal (Par))
or else Nkind (Par) = N_Subprogram_Renaming_Declaration
or else (Nkind (Par) = N_Attribute_Reference
and then Attribute_Name (Par) /= Name_Value)
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index f5c96acea18..fecfcc89e9e 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -5262,8 +5262,7 @@ package body Sem_Ch8 is
Candidate := Non_Limited_View (Id);
Is_New_Candidate := True;
- -- Hide the candidate because it is not used in a proper
- -- context.
+ -- Hide candidate because it is not used in a proper context
else
Candidate := Empty;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index b9773742d9c..38dad254903 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -4607,7 +4607,7 @@ package body Sem_Prag is
-- where there is no later point at which the aspect will be
-- analyzed.
- if GNATprove_Mode or else ASIS_Mode then
+ if GNATprove_Mode or ASIS_Mode then
Analyze_Pre_Post_Condition_In_Decl_Part
(N, Defining_Entity (Unit (Parent (PO))));
end if;
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 173ae54df41..4496672dece 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -519,12 +519,12 @@ package Sinfo is
-- This light expansion does two transformations of the tree, that cannot
-- be postponed after the frontend semantic analysis:
- -- 1. Replace object renamings by renamed object. This requires
- -- introducing temporaries at the point of the renaming, which must be
- -- properly analyzed.
+ -- 1. Replace object renamings by renamed object. This requires the
+ -- introdtion of temporaries at the point of the renaming, which must
+ -- be properly analyzed.
-- 2. Fully qualify entity names. This is needed to generate suitable
- -- local effects/call-graphs in ALI files, with the completely
+ -- local effects and call-graphs in ALI files, with the completely
-- qualified names (in particular the suffix to distinguish homonyms).
-- The tree after this light expansion should be fully analyzed
@@ -553,7 +553,7 @@ package Sinfo is
-- Common Flag Fields --
------------------------
- -- The following flag fields appear in all nodes
+ -- The following flag fields appear in all nodes:
-- Analyzed
-- This flag is used to indicate that a node (and all its children have