diff options
author | Vincent Celier <celier@adacore.com> | 2006-02-15 10:34:58 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2006-02-15 10:34:58 +0100 |
commit | 65aa56ecd6246442ef7e03eb6c2e336a6419b9d1 (patch) | |
tree | fda1ad159253cd6336589c00c573454ac557c958 /gcc/ada/switch-c.adb | |
parent | fd0137781f0f652ea745b7425be69cf9c7123ea8 (diff) | |
download | gcc-65aa56ecd6246442ef7e03eb6c2e336a6419b9d1.zip gcc-65aa56ecd6246442ef7e03eb6c2e336a6419b9d1.tar.gz gcc-65aa56ecd6246442ef7e03eb6c2e336a6419b9d1.tar.bz2 |
back_end.adb (Scan_Compiler_Arguments): Check if Search_Directory_Present is True and...
2006-02-13 Vincent Celier <celier@adacore.com>
* back_end.adb (Scan_Compiler_Arguments): Check if
Search_Directory_Present is True and, if it is, add the argument in
the source search directory path.
* switch-c.adb (Scan_Front_End_Switches): Accept switch "-I". Set
Search_Directory_Present to True.
From-SVN: r111044
Diffstat (limited to 'gcc/ada/switch-c.adb')
-rw-r--r-- | gcc/ada/switch-c.adb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index eaefef9..1428aa7 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2006, 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- -- @@ -102,12 +102,16 @@ package body Switch.C is if Switch_Chars (Ptr) = 'I' then Store_Switch := False; - Ptr := Ptr + 1; + -- Set flag Search_Directory_Present if switch is "-I" only: + -- the directory will be the next argument. - if Ptr > Max then - Bad_Switch (C); + if Ptr = Max then + Search_Directory_Present := True; + return; end if; + Ptr := Ptr + 1; + -- Find out whether this is a -I- or regular -Ixxx switch if Ptr = Max and then Switch_Chars (Ptr) = '-' then |