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]

Patch committed: Bump num_args by 1 in g++spec.c


In my recent patch to add -static-libstdc++ to the G++ driver, I
didn't understand why the code added 2 to the num_args computation,
and I changed it to 1.  However, that was a mistake; the extra 1 is
for the explicit -shared-libgcc which is added.  This patch fixes my
mistake.

Bootstrapped and tested on x86_64-unknown-linux-gnu.  Committed as
obvious.

Ian


2009-07-01  Ian Lance Taylor  <iant@google.com>

	* g++spec.c (lang_specific_driver): Bump num_args by 1.


Index: g++spec.c
===================================================================
--- g++spec.c	(revision 149146)
+++ g++spec.c	(working copy)
@@ -273,7 +273,7 @@ lang_specific_driver (int *in_argc, cons
 
   /* Make sure to have room for the trailing NULL argument.
      Add one for shared_libgcc or extra static library.  */
-  num_args = argc + added + need_math + (library > 0) * 4 + 1;
+  num_args = argc + added + need_math + (library > 0) * 4 + 2;
   arglist = XNEWVEC (const char *, num_args);
 
   i = 0;

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