This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch committed: Bump num_args by 1 in g++spec.c
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 01 Jul 2009 11:47:49 -0700
- Subject: 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;