diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-06-13 12:08:18 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-06-13 12:08:18 +0200 |
commit | 4de100256aeb9ab563d16e3418e270f814a719e8 (patch) | |
tree | bd617d2f3e4d6e1965d82c54b88784e324c83cd2 /gcc | |
parent | 17a3564142202cb76c9fede9cd489d9769f5560b (diff) | |
download | gcc-4de100256aeb9ab563d16e3418e270f814a719e8.zip gcc-4de100256aeb9ab563d16e3418e270f814a719e8.tar.gz gcc-4de100256aeb9ab563d16e3418e270f814a719e8.tar.bz2 |
[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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/ada/exp_attr.adb | 20 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 5 | ||||
-rw-r--r-- | gcc/ada/g-comlin.adb | 12 |
4 files changed, 36 insertions, 20 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 6f4785f..0e241e9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,22 @@ +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. diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 4b4ede7..b16e95d 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -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; diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index a1ff4de..f5c6f57 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -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, diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index 0f74bbf..4a7c85b 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -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; |