Frank Peters posted on Thu, 30 Jun 2011 21:04:29 -0400 as excerpted: > On Fri, 01 Jul 2011 02:44:36 +0300 Nikos Chantziaras <rea...@arcor.de> > wrote: > >> And here you can read more thorough information about strict aliasing: >> >> http://labs.qt.nokia.com/2011/06/10/type-punning-and-strict-aliasing >> > You've saved the day in more ways than one. > > A few days ago I posted about a possible problem with a floating point > test called the UCBTEST. After examining the source code of this test, > I see violations of aliasing rules throughout. It's hard to efficiently > manipulate variables without them. > > Of course, this code was written before the C99 standard and so is > exempt. But the use of "-fno-strict-aliasing" will apply with the > UCBTEST as well.
Truthfully, I thought sure this was a direct follow-on to that! So I'm happy to see that the same cause and solutions apply. =:^) As I said in an earlier post, tho, expect there to be more problems like that with code of that age as time goes on, because they're well past the easy optimizations now, and into stuff like this. So it may be wise to keep an eye out and test the minor gcc version bumps with an eye toward such issues. They generally put out a porting guide, etc, with the new version, that you can read for clues in case the tests start doing unexpected things again. (If you pay attention to flameeyes' blog, he tends to cover such things reasonably early on after release of a new gcc version as well, as he does tinderbox runs to see how bad the interaction of the new version is with the current gentoo ~arch tree as a whole and eventually to test that the latest ~arch packages are updated or patched to fix the problem, before that gcc version gets unmasked to ~arch. By no means do I agree with everything he says, but he really is an asset to gentoo and would be sorely missed should one of his sick episodes make it impossible for him to continue, or if he simply decided he had better things to do with his time. The switch to --as-needed in Gentoo's default ldflags was largely due to his work, explaining the issues for other devs, testing and filing bugs, helping with the hard cases, and in general pushing it until it happened, for instance, and every single gentoo user benefits from that in the form of less mandatory rebuilds, every time they update. It may well have happened without him, but it might have taken a decade longer, too. And because gentoo devs normally push those patches upstream where they can, that has been a benefit to the entire FLOSS community, not just gentoo, as well, reducing "dependency hell" for everyone.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman