This is the mail archive of the gcc@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: Revision 180821 breaks bootstrap


On Nov 3, 2011, at 3:23 PM, Richard Guenther wrote:

> On Thu, Nov 3, 2011 at 3:22 PM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Thu, Nov 3, 2011 at 3:20 PM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
>>> Revision 180821 breaks bootstrap on x86_64-apple-darwin10:
>>> 
>>> ../../work/gcc/collect2.c: In function 'int main(int, char**)':
>>> ../../work/gcc/collect2.c:1094:7: error: unused variable 'object_nbr' [-Werror=unused-variable]
>>> cc1plus: all warnings being treated as errors
>>> 
>>> Note that I did not find any entry for this revision in gcc-patches@gcc.gnu.org.
>> 
>> I suppuse on all non-AIX platforms even ...
> 
> Fixed as follows, committed as obvious.

One possible alternate fix is:

--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -1144,7 +1144,7 @@ main (int argc, char **argv)
   ld1 = CONST_CAST2 (const char **, char **, ld1_argv);
   ld2_argv = XCNEWVEC (char *, argc + 11);
   ld2 = CONST_CAST2 (const char **, char **, ld2_argv);
-  object_lst = XCNEWVEC (char *, argc);
+  object_lst = XCNEWVEC (char *, object_nbr);
   object = CONST_CAST2 (const char **, char **, object_lst);
 
 #ifdef DEBUG


Tell me if you prefer this one.

Sorry for the breakage.

Tristan.


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