This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A problem with LRA
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: comp <comp_607 at 163 dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 18 Apr 2017 08:02:45 -0500
- Subject: Re: A problem with LRA
- Authentication-results: sourceware.org; auth=none
- References: <6363049a.d5cb.15b7c0a88d9.Coremail.comp_607@163.com>
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