From f98de29af633969064d34371b789a58000af8c1e Mon Sep 17 00:00:00 2001 From: charlet Date: Tue, 14 Aug 2007 08:47:56 +0000 Subject: [PATCH] 2007-08-14 Emmanuel Briot * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing switches. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127451 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/g-comlin.adb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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, -- 2.7.4