Re: GCC 4.6.1 and strict-aliasing bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 11, 2011 at 1:46 PM, Torquil Macdonald Sørensen
<torquil@xxxxxxxxx> wrote:

> If I compile with "-O2", it prints 0, which is wrong.
>
> If I compile with "-O2 -fno-strict-aliasing", it prints the correct answer
> 1.6666..
>
> I've verified that the problems goes away after downgrading to g++-4.5.3.

> Best regards and thanks,
> Torquil Sørensen
>

Have you tried compiling with -Wall?  It would be interesting to see
if the compiler thinks there's a strict aliasing violation.

  Brian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux