aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/g-comlin.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 12:08:18 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 12:08:18 +0200
commit4de100256aeb9ab563d16e3418e270f814a719e8 (patch)
treebd617d2f3e4d6e1965d82c54b88784e324c83cd2 /gcc/ada/g-comlin.adb
parent17a3564142202cb76c9fede9cd489d9769f5560b (diff)
downloadgcc-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/ada/g-comlin.adb')
-rw-r--r--gcc/ada/g-comlin.adb12
1 files changed, 3 insertions, 9 deletions
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;