http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46853
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |manu at gcc dot gnu.org Resolution| |DUPLICATE --- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2010-12-09 14:45:18 UTC --- (In reply to comment #3) > There are already many bug reports about missing "used uninitialized" warnings > (such as my PR42905). It seems that the GCC devs do not take them all to > heart. Fixing those bugs would require major work. There is no enough people to do that work. And those bugs are not considered important by core devs. You may have more luck with clang-analyzer, but I think it is still quite green for C++ bugs. > In fact, GCC optimises func into > > int func(void) > { > return 0xFF; > } > > Undefined behavior, so it's correct. Almost 99% sure this is PR 18501. However your PR42905 seems a novel case to me, no idea why it was closed. *** This bug has been marked as a duplicate of bug 18501 ***