aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2015-10-23 12:39:08 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-23 14:39:08 +0200
commitf3bf0d9a5805754b9cc449b8d8d5c64d9e98361a (patch)
tree505900f20a0cf1a18913e8995b20109a4a75fc0a /gcc
parent6031f544ddf64571b5d83c59a9bac6a5fc3d0182 (diff)
downloadgcc-f3bf0d9a5805754b9cc449b8d8d5c64d9e98361a.zip
gcc-f3bf0d9a5805754b9cc449b8d8d5c64d9e98361a.tar.gz
gcc-f3bf0d9a5805754b9cc449b8d8d5c64d9e98361a.tar.bz2
exp_attr.adb, [...]: Minor reformatting.
2015-10-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb, gnatname.adb: Minor reformatting. From-SVN: r229244
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_aggr.adb5
-rw-r--r--gcc/ada/exp_attr.adb9
-rw-r--r--gcc/ada/freeze.adb7
-rw-r--r--gcc/ada/gnatname.adb29
-rw-r--r--gcc/ada/sem_attr.adb8
6 files changed, 35 insertions, 28 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7d6f607..a4dbbe5 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
+ gnatname.adb: Minor reformatting.
+
2015-10-23 Steve Baird <baird@adacore.com>
* a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 4864fbf..f097597 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -6509,9 +6509,10 @@ package body Exp_Aggr is
Into => Target,
Scalar_Comp => Is_Scalar_Type (Component_Type (Typ)),
Indexes => No_List);
- else
- -- Directly or indirectly (e.g. access protected procedure) a record
+ -- Directly or indirectly (e.g. access protected procedure) a record
+
+ else
Aggr_Code := Build_Record_Aggr_Code (N, Typ, Target);
end if;
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index e602b4b..51297ec 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -1473,22 +1473,25 @@ package body Exp_Attr is
declare
T1 : constant Entity_Id := Make_Temporary (Loc, 'T', Left);
T2 : constant Entity_Id := Make_Temporary (Loc, 'T', Right);
+
begin
Rewrite (N,
Make_Expression_With_Actions (Loc,
- Actions => New_List (
+ Actions => New_List (
Make_Object_Declaration (Loc,
Defining_Identifier => T1,
+ Constant_Present => True,
Object_Definition =>
New_Occurrence_Of (Etype (Left), Loc),
- Constant_Present => True,
Expression => Relocate_Node (Left)),
+
Make_Object_Declaration (Loc,
Defining_Identifier => T2,
+ Constant_Present => True,
Object_Definition =>
New_Occurrence_Of (Etype (Right), Loc),
- Constant_Present => True,
Expression => Relocate_Node (Right))),
+
Expression =>
Make_If_Expression (Loc,
Expressions => New_List (
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 91ff7a0..081d751 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -3356,8 +3356,9 @@ package body Freeze is
and then not Has_Warnings_Off (E)
and then not Has_Warnings_Off (R_Type)
then
- Error_Msg_N ("?x?foreign convention function& should not " &
- "return unconstrained array!", E);
+ Error_Msg_N
+ ("?x?foreign convention function& should not return "
+ & "unconstrained array!", E);
end if;
end if;
@@ -4266,7 +4267,7 @@ package body Freeze is
end if;
end if;
- -- The following checks are only relevant when SPARK_Mode is on as
+ -- The following checks are relevant only when SPARK_Mode is on as
-- they are not standard Ada legality rules.
if SPARK_Mode = On then
diff --git a/gcc/ada/gnatname.adb b/gcc/ada/gnatname.adb
index 5af5d53..a01bbb2 100644
--- a/gcc/ada/gnatname.adb
+++ b/gcc/ada/gnatname.adb
@@ -613,22 +613,22 @@ begin
declare
Gnatname : constant String_Access :=
Program_Name ("gnatname", "gnatname");
+ Arg_Len : Positive := Argument_Count;
Target : String_Access := null;
- Arg_Len : Positive := Argument_Count;
begin
-- Find the target, if any
if Gnatname.all /= "gnatname" then
- Target := new String'(Gnatname
- (Gnatname'First .. Gnatname'Last - 9));
+ Target :=
+ new String'(Gnatname (Gnatname'First .. Gnatname'Last - 9));
Arg_Len := Arg_Len + 1;
end if;
declare
+ Args : Argument_List (1 .. Arg_Len);
Gprname : String_Access :=
- Locate_Exec_On_Path (Exec_Name => "gprname");
- Args : Argument_List (1 .. Arg_Len);
+ Locate_Exec_On_Path (Exec_Name => "gprname");
Success : Boolean;
begin
@@ -640,8 +640,7 @@ begin
-- Add the target if there is one
if Target /= null then
- Args (Args'Last) :=
- new String'("--target=" & Target.all);
+ Args (Args'Last) := new String'("--target=" & Target.all);
end if;
Spawn (Gprname.all, Args, Success);
@@ -656,19 +655,19 @@ begin
end;
end if;
- if Create_Project then
- -- This only happens if gprname is not found or if the invocation of
- -- gprname did not succeed.
+ -- This only happens if gprname is not found or if the invocation of
+ -- gprname did not succeed.
+ if Create_Project then
Write_Line
- ("warning: gnatname -P is obsolete and will not be available "
- & "in the next release; use gprname instead");
+ ("warning: gnatname -P is obsolete and will not be available in the "
+ & "next release; use gprname instead");
end if;
-- If no Ada or foreign pattern was specified, print the usage and return
if Patterns.Last (Arguments.Table (Arguments.Last).Name_Patterns) = 0
- and then
+ and then
Patterns.Last (Arguments.Table (Arguments.Last).Foreign_Patterns) = 0
then
if Argument_Count = 0 then
@@ -685,9 +684,7 @@ begin
-- information, the current directory is the directory of the specified
-- file.
- if Patterns.Last
- (Arguments.Table (Arguments.Last).Directories) = 0
- then
+ if Patterns.Last (Arguments.Table (Arguments.Last).Directories) = 0 then
Patterns.Append
(Arguments.Table (Arguments.Last).Directories, new String'("."));
end if;
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 948d71a..21b66d4 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -4312,10 +4312,10 @@ package body Sem_Attr is
Stmt := Parent (Stmt);
end loop;
- -- Loop_Entry must appear within a Loop_Assertion pragma (Assert,
- -- Assert_And_Cut, Assume count as loop assertion pragmas for this
- -- purpose if they appear in an appropriate location in a loop,
- -- which was already checked by the top level pragma circuit).
+ -- Loop_Entry must appear within a Loop_Assertion pragma (Assert,
+ -- Assert_And_Cut, Assume count as loop assertion pragmas for this
+ -- purpose if they appear in an appropriate location in a loop,
+ -- which was already checked by the top level pragma circuit).
if No (Enclosing_Pragma) then
Error_Attr ("attribute% must appear within appropriate pragma", N);