https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90757

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
  float testValue = 3.25;
  char* warningAvoider = reinterpret_cast<char *>(&testValue);
  int32_t rawValue = *(reinterpret_cast<int32_t*>(warningAvoider));

this is just invalid code.  Use -fno-strict-aliasing if you need to play
this kind of tricks or use memcpy to access the "raw value".

reinterpret_cast is not a way to circumvent type-based alias rules.

Reply via email to