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: -Wuninitialized issues


Ian Lance Taylor wrote:
> Jeffrey A Law <law@redhat.com> writes:
> 
> 
>>We clearly disagree then.  Though my 15+ years of working with GCC I've
>>seen far more complaints about false positives than missing instances
>>of this warning.
> 
> 
> I think that most of the false positives are of the form
> 
>     int x, f, y;
>     f = foo ();
>     if (f)
>       x = 1;
>     y = g ();
>     if (f)
>       y = x;
>     return y;
> 
> Here presumably we can all agree that gcc ideally should not warn that
> x may be used uninitialized.

Indeed; I definitely agree that we shouldn't warn about this.  The users
have spoken definitively, if nothing else.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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