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
This commit is contained in:
parent
6031f544dd
commit
f3bf0d9a58
|
@ -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>
|
2015-10-23 Steve Baird <baird@adacore.com>
|
||||||
|
|
||||||
* a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
|
* a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
|
||||||
|
|
|
@ -6509,9 +6509,10 @@ package body Exp_Aggr is
|
||||||
Into => Target,
|
Into => Target,
|
||||||
Scalar_Comp => Is_Scalar_Type (Component_Type (Typ)),
|
Scalar_Comp => Is_Scalar_Type (Component_Type (Typ)),
|
||||||
Indexes => No_List);
|
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);
|
Aggr_Code := Build_Record_Aggr_Code (N, Typ, Target);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
|
|
@ -1473,22 +1473,25 @@ package body Exp_Attr is
|
||||||
declare
|
declare
|
||||||
T1 : constant Entity_Id := Make_Temporary (Loc, 'T', Left);
|
T1 : constant Entity_Id := Make_Temporary (Loc, 'T', Left);
|
||||||
T2 : constant Entity_Id := Make_Temporary (Loc, 'T', Right);
|
T2 : constant Entity_Id := Make_Temporary (Loc, 'T', Right);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Rewrite (N,
|
Rewrite (N,
|
||||||
Make_Expression_With_Actions (Loc,
|
Make_Expression_With_Actions (Loc,
|
||||||
Actions => New_List (
|
Actions => New_List (
|
||||||
Make_Object_Declaration (Loc,
|
Make_Object_Declaration (Loc,
|
||||||
Defining_Identifier => T1,
|
Defining_Identifier => T1,
|
||||||
|
Constant_Present => True,
|
||||||
Object_Definition =>
|
Object_Definition =>
|
||||||
New_Occurrence_Of (Etype (Left), Loc),
|
New_Occurrence_Of (Etype (Left), Loc),
|
||||||
Constant_Present => True,
|
|
||||||
Expression => Relocate_Node (Left)),
|
Expression => Relocate_Node (Left)),
|
||||||
|
|
||||||
Make_Object_Declaration (Loc,
|
Make_Object_Declaration (Loc,
|
||||||
Defining_Identifier => T2,
|
Defining_Identifier => T2,
|
||||||
|
Constant_Present => True,
|
||||||
Object_Definition =>
|
Object_Definition =>
|
||||||
New_Occurrence_Of (Etype (Right), Loc),
|
New_Occurrence_Of (Etype (Right), Loc),
|
||||||
Constant_Present => True,
|
|
||||||
Expression => Relocate_Node (Right))),
|
Expression => Relocate_Node (Right))),
|
||||||
|
|
||||||
Expression =>
|
Expression =>
|
||||||
Make_If_Expression (Loc,
|
Make_If_Expression (Loc,
|
||||||
Expressions => New_List (
|
Expressions => New_List (
|
||||||
|
|
|
@ -3356,8 +3356,9 @@ package body Freeze is
|
||||||
and then not Has_Warnings_Off (E)
|
and then not Has_Warnings_Off (E)
|
||||||
and then not Has_Warnings_Off (R_Type)
|
and then not Has_Warnings_Off (R_Type)
|
||||||
then
|
then
|
||||||
Error_Msg_N ("?x?foreign convention function& should not " &
|
Error_Msg_N
|
||||||
"return unconstrained array!", E);
|
("?x?foreign convention function& should not return "
|
||||||
|
& "unconstrained array!", E);
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
@ -4266,7 +4267,7 @@ package body Freeze is
|
||||||
end if;
|
end if;
|
||||||
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.
|
-- they are not standard Ada legality rules.
|
||||||
|
|
||||||
if SPARK_Mode = On then
|
if SPARK_Mode = On then
|
||||||
|
|
|
@ -613,22 +613,22 @@ begin
|
||||||
declare
|
declare
|
||||||
Gnatname : constant String_Access :=
|
Gnatname : constant String_Access :=
|
||||||
Program_Name ("gnatname", "gnatname");
|
Program_Name ("gnatname", "gnatname");
|
||||||
Target : String_Access := null;
|
|
||||||
Arg_Len : Positive := Argument_Count;
|
Arg_Len : Positive := Argument_Count;
|
||||||
|
Target : String_Access := null;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
-- Find the target, if any
|
-- Find the target, if any
|
||||||
|
|
||||||
if Gnatname.all /= "gnatname" then
|
if Gnatname.all /= "gnatname" then
|
||||||
Target := new String'(Gnatname
|
Target :=
|
||||||
(Gnatname'First .. Gnatname'Last - 9));
|
new String'(Gnatname (Gnatname'First .. Gnatname'Last - 9));
|
||||||
Arg_Len := Arg_Len + 1;
|
Arg_Len := Arg_Len + 1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
|
Args : Argument_List (1 .. Arg_Len);
|
||||||
Gprname : String_Access :=
|
Gprname : String_Access :=
|
||||||
Locate_Exec_On_Path (Exec_Name => "gprname");
|
Locate_Exec_On_Path (Exec_Name => "gprname");
|
||||||
Args : Argument_List (1 .. Arg_Len);
|
|
||||||
Success : Boolean;
|
Success : Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -640,8 +640,7 @@ begin
|
||||||
-- Add the target if there is one
|
-- Add the target if there is one
|
||||||
|
|
||||||
if Target /= null then
|
if Target /= null then
|
||||||
Args (Args'Last) :=
|
Args (Args'Last) := new String'("--target=" & Target.all);
|
||||||
new String'("--target=" & Target.all);
|
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Spawn (Gprname.all, Args, Success);
|
Spawn (Gprname.all, Args, Success);
|
||||||
|
@ -656,13 +655,13 @@ begin
|
||||||
end;
|
end;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
if Create_Project then
|
|
||||||
-- This only happens if gprname is not found or if the invocation of
|
-- This only happens if gprname is not found or if the invocation of
|
||||||
-- gprname did not succeed.
|
-- gprname did not succeed.
|
||||||
|
|
||||||
|
if Create_Project then
|
||||||
Write_Line
|
Write_Line
|
||||||
("warning: gnatname -P is obsolete and will not be available "
|
("warning: gnatname -P is obsolete and will not be available in the "
|
||||||
& "in the next release; use gprname instead");
|
& "next release; use gprname instead");
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- If no Ada or foreign pattern was specified, print the usage and return
|
-- If no Ada or foreign pattern was specified, print the usage and return
|
||||||
|
@ -685,9 +684,7 @@ begin
|
||||||
-- information, the current directory is the directory of the specified
|
-- information, the current directory is the directory of the specified
|
||||||
-- file.
|
-- file.
|
||||||
|
|
||||||
if Patterns.Last
|
if Patterns.Last (Arguments.Table (Arguments.Last).Directories) = 0 then
|
||||||
(Arguments.Table (Arguments.Last).Directories) = 0
|
|
||||||
then
|
|
||||||
Patterns.Append
|
Patterns.Append
|
||||||
(Arguments.Table (Arguments.Last).Directories, new String'("."));
|
(Arguments.Table (Arguments.Last).Directories, new String'("."));
|
||||||
end if;
|
end if;
|
||||||
|
|
Loading…
Reference in New Issue