This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix PR c/4988


[Take Two]

--target-help (and --help) print out the information from the main
compiler twice.  This is because the driver passes the option twice on
its command line.

This is fixed by the patch below.  As it is also a 2.95.x regression,
and really obvious now 8-), it should go on the branch too.  Is that
OK Mark?
 
OK to commit?

Neil.

	PR c/4988
	* gcc.c (process_command): Don't pass the options to the
	preprocessor; it picks them up when passed to cc1.

Index: gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.272
diff -u -p -r1.272 gcc.c
--- gcc.c	2001/12/03 19:13:22	1.272
+++ gcc.c	2001/12/03 20:51:02
@@ -3310,7 +3310,6 @@ process_command (argc, argv)
 	  n_infiles++;
 	  n_switches++;
 
-	  add_preprocessor_option ("--help", 6);
 	  add_assembler_option ("--help", 6);
 	  add_linker_option ("--help", 6);
 	}
@@ -3323,7 +3322,6 @@ process_command (argc, argv)
           n_infiles++;
           n_switches++;
 
-          add_preprocessor_option ("--target-help", 13);
           add_assembler_option ("--target-help", 13);
           add_linker_option ("--target-help", 13);
         }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]