This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/56574] False possibly uninitialized variable warning
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Jun 2014 12:27:37 +0000
- Subject: [Bug middle-end/56574] False possibly uninitialized variable warning
- Auto-submitted: auto-generated
- References: <bug-56574-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56574
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #9 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #8)
> > ISO C99 6.5.13 says that 'value' is not evaluated when !flag is false. But
> > clearly we are not considering the "side-effect" of using an uninitialized
> > variable when deciding to output straight-line code sequences.
>
> But evaluating an uninitialized variable is not a side-effect, unless
> accessing the variable itself has a side-effect, so there is no wrong code
> here.
Perhaps the uninit pass can be taught that for a & b when a may be
uninitialized is actually guarded by if(b!=0). I think this will fix the bug
here, no?