From cdc02080d5ff8c4b80155989816cd4df65a070ec Mon Sep 17 00:00:00 2001
From: wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 4 May 2005 17:20:43 +0000
Subject: [PATCH] Fix the Xassembler and Xpreprocessor options, which have
 never worked right. PR driver/21112 * gcc.c (process_command): In the second
 argv scan loop, ignore Xassembler and Xpreprocessor, along with their
 argument.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99221 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog |  6 ++++++
 gcc/gcc.c     | 12 ++++--------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e2568bc0c2b0..716e81f82afa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-04  James E Wilson  <wilson@specifixinc.com>
+
+	PR driver/21112
+	* gcc.c (process_command): In the second argv scan loop, ignore
+	Xassembler and Xpreprocessor, along with their argument.
+
 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* tree-flow-inline.h, tree-ssa-operands.c,
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 1a0418d9ed07..e131eb6f8ef8 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3942,16 +3942,12 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
 	  infiles[n_infiles].language = "*";
 	  infiles[n_infiles++].name = argv[++i];
 	}
+      /* Xassembler and Xpreprocessor were already handled in the first argv
+	 scan, so all we need to do here is ignore them and their argument.  */
       else if (strcmp (argv[i], "-Xassembler") == 0)
-	{
-	  infiles[n_infiles].language = "*";
-	  infiles[n_infiles++].name = argv[++i];
-	}
+	i++;
       else if (strcmp (argv[i], "-Xpreprocessor") == 0)
-	{
-	  infiles[n_infiles].language = "*";
-	  infiles[n_infiles++].name = argv[++i];
-	}
+	i++;
       else if (strcmp (argv[i], "-l") == 0)
 	{ /* POSIX allows separation of -l and the lib arg;
 	     canonicalize by concatenating -l with its arg */
-- 
GitLab