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: [PATCH, tree-ssa] Avoid -Wuninitialized warning in try_unroll_loop_completely()


2013/4/18 Jeff Law <law@redhat.com>:
> On 04/15/2013 08:35 PM, Chung-Ju Wu wrote:
>>
>> I was using gcc-4.6.3, which is provided by Ubuntu 12.04,
>> and the warning is displayed during the compilation process.
>> As I tried to build another native gcc by myself with
>> current main trunk and used it to compile tree-ssa-loop-ivcanon.c again,
>> there is no such warning at all.
>> (See attachment for my console output.)
>>
>> So I am wondering if my patch is still valuable since
>> such false positive warning is already fixed on trunk.
>
> Thanks for checking on this stuff.  My preference would be to not add the
> initialization unless we're currently seeing false positive warnings with
> the trunk.
>
> Anytime we add a dummy initialization like this to avoid a false positive,
> we run the risk of missing real bugs later if the nearby code is changed in
> such a way as to expose an uninitialized use, which we'd like to catch, but
> can't if we're inserted a dummy initialization.
>
> Jeff
>

I see.  Leaving it unchanged indeed helps to catch possible bug
when nearby code is modified.

I will not commit this patch.
Thanks for the review and I did learn a lot from it! :)


Best regards,
jasonwucj


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