This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [patch] bfd - fix warning


Matthias Klose wrote:
> Dave Korn schrieb:
>> Matthias Klose wrote:
>>> I see the follwing warning (building with GCC-4.4):
>>>
>>> peigen.c: In function '_bfd_pei_swap_sym_in':
>>> peigen.c:133: error: 'name' may be used uninitialized in this function
>>> make[3]: *** [peigen.lo] Error 1
>>   How peculiar.  I can't reproduce this with any of 4.3.2, 4.4.0rc and 4.5.0
>> on i686-pc-cygwin.  Are you using a plain vanilla build from upstream or do
>> you have distro-local patches?  Is your host 32- or 64-bit?
> 
>  -g0 -Os was used on ix86-linux.

  Ah, it's the -Os that does it; with that flag I can reproduce it on all the
above-mentioned versions.  Wonder whether the absence of a warning without
that flag is because the analysis is more accurate, and it determines it can't
be used without first having been set, or whether the warning is missing
because the analysis is worse and doesn't even spot the possibility of an
uninitialised use.

    cheers,
      DaveK


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