It does not work when -fno-strict-aliasing is specified.
At 2017-04-18 21:02:45, "Segher Boessenkool" <seg...@kernel.crashing.org> wrote:
>Hi,
>
>On Mon, Apr 17, 2017 at 09:11:56PM +0800, comp wrote:
>>         float b;
>>         *(int*)&b=a;
>
>This is undefined behaviour.  Try with -fno-strict-aliasing, does it
>then work as you expect?
>
>
>Segher

Reply via email to