• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gcc4 optimization problems on intel mac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc4 optimization problems on intel mac


  • Subject: Re: gcc4 optimization problems on intel mac
  • From: Eric Albert <email@hidden>
  • Date: Wed, 24 Jan 2007 14:55:53 -0500

On Jan 24, 2007, at 3:43 AM, Jim Wintermyre wrote:

Under *any* setting except -O0, these strange behaviors would reappear, though without optimization everything runs normally. Other optimization- related settings, such as loop unrolling, do not seem to effect the software's stability.

I recall an issue I had (in an AU plugin), where another optimization setting did seem to interact with the optimization level. Specifically, I was having the problem only when the optimization level was greater than -O0, AND "Enforce Strict Aliasing" was enabled. In this case it wasn't an Intel-specific issue, but the point is sometimes the settings do seem to affect each other subtly.

Strict aliasing is tricky -- it's a nice performance optimization in some cases, but the catch is that it's unsafe for certain code and gcc can't warn you about all of the cases in which it's unsafe. In other words, if you use it you can easily run into problems like this where something goes wrong and you have to do a lot of debugging on a release build to track it down. If that's something you'd rather avoid (I know I would), it's probably best to avoid using strict aliasing.


-Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: gcc4 optimization problems on intel mac (From: Jim Wintermyre <email@hidden>)

  • Prev by Date: Re: Wrong virtual function call [SOLVED]
  • Next by Date: Universal build of cranky open source lib with a configure script
  • Previous by thread: Re: gcc4 optimization problems on intel mac
  • Next by thread: Re: gcc4 optimization problems on intel mac
  • Index(es):
    • Date
    • Thread