aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Briot <briot@adacore.com>2007-08-14 10:47:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-14 10:47:56 +0200
commit171d182e7f3a5cb93f9e95aded02ed5a2d48e0c4 (patch)
tree1400d0dde1a69af554c588ecdf20aebda7545c08
parent154c16575f0f10392d3798f6470eb0951084ea6c (diff)
downloadgcc-171d182e7f3a5cb93f9e95aded02ed5a2d48e0c4.zip
gcc-171d182e7f3a5cb93f9e95aded02ed5a2d48e0c4.tar.gz
gcc-171d182e7f3a5cb93f9e95aded02ed5a2d48e0c4.tar.bz2
g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing switches.
2007-08-14 Emmanuel Briot <briot@adacore.com> * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing switches. From-SVN: r127451
-rw-r--r--gcc/ada/g-comlin.adb22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb
index 52a1555..9abd4b0 100644
--- a/gcc/ada/g-comlin.adb
+++ b/gcc/ada/g-comlin.adb
@@ -581,6 +581,17 @@ package body GNAT.Command_Line is
-- If Concatenate is False and the full argument is not
-- recognized as a switch, this is an invalid switch.
+ if Switches (Switches'First) = '*' then
+ Set_Parameter
+ (The_Switch,
+ Arg_Num => Current_Argument,
+ First => 1,
+ Last => CL.Argument (Current_Argument)'Last);
+ Is_Switch (Current_Argument) := True;
+ Dummy := Goto_Next_Argument_In_Section;
+ return '*';
+ end if;
+
Set_Parameter (The_Switch,
Arg_Num => Current_Argument,
First => Current_Index,
@@ -597,6 +608,17 @@ package body GNAT.Command_Line is
-- If Concatenate is False and the full argument is not
-- recognized as a switch, this is an invalid switch.
+ if Switches (Switches'First) = '*' then
+ Set_Parameter
+ (The_Switch,
+ Arg_Num => Current_Argument,
+ First => 1,
+ Last => CL.Argument (Current_Argument)'Last);
+ Is_Switch (Current_Argument) := True;
+ Dummy := Goto_Next_Argument_In_Section;
+ return '*';
+ end if;
+
Set_Parameter (The_Switch,
Arg_Num => Current_Argument,
First => Current_Index,