[haiku-development] Re: Disabling Strict Aliasing for GCC4 Builds

  • From: "Ryan Leavengood" <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 17 Apr 2008 16:49:29 -0400

On Thu, Apr 17, 2008 at 4:36 PM, Michael Lotz <mmlr@xxxxxxxx> wrote:
>
> As far as I've understood the subject (and I really hope I got it
> right) the problem could be demonstrated by a code snippet:
>
> double someDouble = 0.0;
> int someInt = *(int *)&some;

I assume the second line is meant to be:

int someInt = *(int *)&someDouble;

Right?

> I'd be interested in comments on that topic before applying anything
> though. Is my understanding of the problem correct at all, do we care
> about those optimizations and how would others suggest we move forward
> with that?

I am certainly not a compiler expert and don't have the time now to
research this aliasing issue, but I do recall hearing how Rene Gollent
cannot get a stable Haiku on his hardware when compiling with GCC4. So
it might be related to this issue or other alignment issues messing up
driver code and therefore causing a crash. So until we can really dig
into these issues it might be smart to go easy on the optimizations.

Ryan

Other related posts: