Re: Need Optimizer bug workaround

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

 



Tina VanRoggen wrote:

>         tobj->SetParameter(4110, *(long *) &p1);

http://mail-index.netbsd.org/tech-kern/2003/08/11/0001.html

Just to be clear, this is a violation of the ISO C pointer aliasing
rules.  These rules were put in the standard to allow compilers to do a
better job of optimizing, and here gcc 4.x is taking advantage of them
where it did not in prior versions.  It does not mean there is a bug in
gcc, it means you need to fix your code to not use this construct (or
the suboptimal solution of instructing gcc to relax its aliasing
enforcement with -fno-strict-aliasing as mentioned already.)

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