summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-17 05:53:11 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-17 05:53:11 +0000
commit0c76b21e3a9b993ce607842dbd2ddb916f642a49 (patch)
treefc2bcc637d3b868e94f26db4a53f327af3591a7e /gcc/gcc.c
parent1b5a05b086f8f09a35137e3d928139ba6d32c4fa (diff)
downloadgcc-0c76b21e3a9b993ce607842dbd2ddb916f642a49.tar.gz
* gcc.c (used_arg): Check whether an option has been removed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80787 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index e004697431e..f9a4e1db3cd 100644
--- 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