• 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
Controlling optimization level per function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Controlling optimization level per function


  • Subject: Controlling optimization level per function
  • From: Eric Gorr <email@hidden>
  • Date: Fri, 9 Jul 2010 14:30:27 -0400

I've got this strange bug that I think it tied to the optimization level. I am using the GCC4.2-LLVM compiler in Xcode 3.2.2.


What I thought would work is just wrapping my function:

#pragma GCC optimization_level 0


void CDataBarView::PositionControls( ... )
{
 ...
}

#pragma GCC optimization_level reset

But this does not appear to have any affect.

For example, I might have expected to be able to set a breakpoint in this function, see the local variables, and single step through it. However, none of the local variables show up and stepping through the function behaves as if the function were still be optimized at a higher level.

How can I control the optimization level for a function in my case? Is this possible?


Thank you.


 _______________________________________________
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

  • Follow-Ups:
    • Re: Controlling optimization level per function
      • From: lbland <email@hidden>
    • Re: Controlling optimization level per function
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: Gdb Internal Error
  • Next by Date: Re: Controlling optimization level per function
  • Previous by thread: Re: File-not-found in new target -- SOLVED
  • Next by thread: Re: Controlling optimization level per function
  • Index(es):
    • Date
    • Thread