[Bug c++/49338] wrong code with -O2 and -O3

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 9 09:09:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49338

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-09 09:08:51 UTC ---
Try -Wstrict-aliasing=2 or -Wstrict-aliasing=1 if -Wstrict-aliasing doesn't
report anything.  Anyway, why are you fighting so hard to avoid fixing your
buggy code?  It isn't hard to rewrite it using an union:
  union { U64 i; double d; } u;
  u.i = m_Value.m_U64 & ~((U64)1);
  return u.d;



More information about the Gcc-bugs mailing list