Fix the Xassembler and Xpreprocessor options, which have never worked right.
authorJames E Wilson <wilson@specifixinc.com>
Wed, 4 May 2005 17:20:43 +0000 (17:20 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 4 May 2005 17:20:43 +0000 (10:20 -0700)
PR driver/21112
* gcc.c (process_command): In the second argv scan loop, ignore
Xassembler and Xpreprocessor, along with their argument.

From-SVN: r99221

gcc/ChangeLog
gcc/gcc.c

index e2568bc0c2b0c3214955b05e7d1a5dd626b0db7c..716e81f82afabe8d91ba3fbeb61a80e58b6b7ac6 100644 (file)
@@ -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,
index 1a0418d9ed070e1c0ce40ee1e05840cf05aa280b..e131eb6f8ef8285c72f676115cac8c49e369e249 100644 (file)
--- 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 */