OSDN Git Service

* gcc.c (used_arg): Check whether an option has been removed.
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Apr 2004 05:53:11 +0000 (05:53 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Apr 2004 05:53:11 +0000 (05:53 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80787 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gcc.c

index f50a5ea..7566df2 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-17  Richard Sandiford  <rsandifo@redhat.com>
+
+       * gcc.c (used_arg): Check whether an option has been removed.
+
 2004-04-17  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * config.gcc (i[34567]86-*-solaris2*): Default to DWARF-2
index e004697..f9a4e1d 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -6909,20 +6909,21 @@ used_arg (const char *p, int len)
        = xmalloc (sizeof (struct mswitchstr)
                   * (n_mdswitches + (n_switches ? n_switches : 1)));
       for (i = 0; i < n_switches; i++)
-       {
-         int xlen = strlen (switches[i].part1);
-         for (j = 0; j < cnt; j++)
-           if (xlen == matches[j].len
-               && ! strncmp (switches[i].part1, matches[j].str, xlen))
-             {
-               mswitches[n_mswitches].str = matches[j].replace;
-               mswitches[n_mswitches].len = matches[j].rep_len;
-               mswitches[n_mswitches].replace = (char *) 0;
-               mswitches[n_mswitches].rep_len = 0;
-               n_mswitches++;
-               break;
-             }
-       }
+       if (switches[i].live_cond != SWITCH_IGNORE)
+         {
+           int xlen = strlen (switches[i].part1);
+           for (j = 0; j < cnt; j++)
+             if (xlen == matches[j].len
+                 && ! strncmp (switches[i].part1, matches[j].str, xlen))
+               {
+                 mswitches[n_mswitches].str = matches[j].replace;
+                 mswitches[n_mswitches].len = matches[j].rep_len;
+                 mswitches[n_mswitches].replace = (char *) 0;
+                 mswitches[n_mswitches].rep_len = 0;
+                 n_mswitches++;
+                 break;
+               }
+         }
 
       /* Add MULTILIB_DEFAULTS switches too, as long as they were not present
         on the command line nor any options mutually incompatible with