[Bug tree-optimization/60165] "may be used uninitialized" warning with -O3 but not with -O2
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 13 09:21:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60165
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> (In reply to Vincent Lefèvre from comment #2)
> > Well, the code paths in question do not necessarily exist (you could say the
> > same thing with -O2, where the function is not inlined: there may be some
> > code paths for which fn1() doesn't initialize c).
>
> The code path exists in the code, the fact that perhaps in your program such
> code path is never taken doesn't mean it is undesirable to warn about it.
> GCC has two kinds of warnings, the is uninitialized one where particular
> code, if executed, will always use uninitialized value, and maybe
> uninitialized, where it will use uninitialized value only conditionally.
> That is the case here.
Where it of course still only assumes that the function is entered at all.
More information about the Gcc-bugs
mailing list