diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2004-04-17 05:53:11 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2004-04-17 05:53:11 +0000 |
commit | f645e2bd33e2ff6b96e82913d013be4c7cf09052 (patch) | |
tree | fc2bcc637d3b868e94f26db4a53f327af3591a7e /gcc/gcc.c | |
parent | 04db08dbd114491228b3181f74fd2d0cd57f8ad7 (diff) | |
download | gcc-f645e2bd33e2ff6b96e82913d013be4c7cf09052.zip gcc-f645e2bd33e2ff6b96e82913d013be4c7cf09052.tar.gz gcc-f645e2bd33e2ff6b96e82913d013be4c7cf09052.tar.bz2 |
* gcc.c (used_arg): Check whether an option has been removed.
From-SVN: r80787
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -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 |