This is the mail archive of the gcc-bugs@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]

[Bug middle-end/56574] False possibly uninitialized variable warning


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?

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