[Bug c/31734] optimizer looses ops for with aliasing
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Apr 29 18:58:00 GMT 2007
------- Comment #3 from ebotcazou at gcc dot gnu dot org 2007-04-29 19:58 -------
> Given that "A character type may alias any other type.",
> I suppose I should be able to use (it works):
>
> memcpy(&out->fraction, &value, 4);
> memcpy(&out->mantissa, 4+(char*)&value, 4);
> out->mantissa &= 0x7fffffff;
Right, this is valid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31734
More information about the Gcc-bugs
mailing list