Commit 4de10025 by Arnaud Charlet

[multiple changes]

2014-06-13  Emmanuel Briot  <briot@adacore.com>

	* g-comlin.adb (Get_Argument): fix expansion
	of command line arguments (e.g. "*.adb") when using a custom
	parser. The parser was not passed to the recursive call, and
	thus we were trying to do the expansion on the default command
	line parser.

2014-06-13  Thomas Quinot  <quinot@adacore.com>

	* exp_ch9.adb: Minor reformatting.

2014-06-13  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
	To determine whether the attribute should be expanded, examine
	whether the enclosing postcondition pragma is to be checked,
	rather than using the internal flag Assertions_Enabled.

From-SVN: r211621
parent 17a35641
2014-06-13 Emmanuel Briot <briot@adacore.com>
* g-comlin.adb (Get_Argument): fix expansion
of command line arguments (e.g. "*.adb") when using a custom
parser. The parser was not passed to the recursive call, and
thus we were trying to do the expansion on the default command
line parser.
2014-06-13 Thomas Quinot <quinot@adacore.com>
* exp_ch9.adb: Minor reformatting.
2014-06-13 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
To determine whether the attribute should be expanded, examine
whether the enclosing postcondition pragma is to be checked,
rather than using the internal flag Assertions_Enabled.
2014-06-13 Ben Brosgol <brosgol@adacore.com>
* gnat_rm.texi: Minor fixes.
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -3962,13 +3962,6 @@ package body Exp_Attr is
Temp : Entity_Id;
begin
-- If assertions are disabled, no need to create the declaration
-- that preserves the value.
if not Assertions_Enabled then
return;
end if;
Temp := Make_Temporary (Loc, 'T', Pref);
-- Climb the parent chain looking for subprogram _Postconditions
......@@ -3978,6 +3971,17 @@ package body Exp_Attr is
exit when Nkind (Subp) = N_Subprogram_Body
and then Chars (Defining_Entity (Subp)) = Name_uPostconditions;
-- If assertions are disabled, no need to create the declaration
-- that preserves the value. The postcondition pragma in which
-- 'Old appears will be checked or disabled according to the
-- current policy in effect.
if Nkind (Subp) = N_Pragma
and then not Is_Checked (Subp)
then
return;
end if;
Subp := Parent (Subp);
end loop;
......
......@@ -1206,11 +1206,10 @@ package body Exp_Ch9 is
end if;
Master_Id :=
Make_Defining_Identifier (Loc,
New_External_Name (Chars (Typ), 'M'));
Make_Defining_Identifier (Loc, New_External_Name (Chars (Typ), 'M'));
-- Generate:
-- Mnn renames _master;
-- typeMnn renames _master;
Ren_Decl :=
Make_Object_Renaming_Declaration (Loc,
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2013, Free Software Foundation, Inc. --
-- Copyright (C) 1999-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -402,7 +402,6 @@ package body GNAT.Command_Line is
end if;
if Parser.Current_Argument > Parser.Arg_Count then
-- If this is the first time this function is called
if Parser.Current_Index = 1 then
......@@ -449,21 +448,16 @@ package body GNAT.Command_Line is
declare
Arg : constant String :=
Argument (Parser, Parser.Current_Argument - 1);
Index : Positive;
begin
Index := Arg'First;
while Index <= Arg'Last loop
for Index in Arg'Range loop
if Arg (Index) = '*'
or else Arg (Index) = '?'
or else Arg (Index) = '['
then
Parser.In_Expansion := True;
Start_Expansion (Parser.Expansion_It, Arg);
return Get_Argument (Do_Expansion);
return Get_Argument (Do_Expansion, Parser);
end if;
Index := Index + 1;
end loop;
end;
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment