From f71faa5296bce977a67fd1d8fb9d5e74cb143de9 Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 30 Nov 2009 13:58:01 +0000 Subject: 2009-11-30 Vincent Celier * gnatcmd.adb (Check_Files): Recognize documented switches that have a separate parameter. 2009-11-30 Robert Dewar * sem_util.ads: Minor reformatting * errout.adb: Minor reformatting Minor code reorganization (use N_Subprogram_Specification to simplify) * exp_ch7.adb: Add comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154802 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gnatcmd.adb | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'gcc/ada/gnatcmd.adb') diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index e0ccc228473..1588d4e43a8 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -318,8 +318,31 @@ procedure GNATCmd is for Index in 1 .. Last_Switches.Last loop if Last_Switches.Table (Index) (1) /= '-' then - Add_Sources := False; - exit; + if Index = 1 + or else + (The_Command = Check + and then + Last_Switches.Table (Index - 1).all /= "-o") + or else + (The_Command = Pretty + and then + Last_Switches.Table (Index - 1).all /= "-o" and then + Last_Switches.Table (Index - 1).all /= "-of") + or else + (The_Command = Metric + and then + Last_Switches.Table (Index - 1).all /= "-o" and then + Last_Switches.Table (Index - 1).all /= "-og" and then + Last_Switches.Table (Index - 1).all /= "-ox" and then + Last_Switches.Table (Index - 1).all /= "-d") + or else + (The_Command /= Check and then + The_Command /= Pretty and then + The_Command /= Metric) + then + Add_Sources := False; + exit; + end if; end if; end loop; -- cgit v1.2.1