• 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: How to disable gcc automatic inlining ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to disable gcc automatic inlining ?


  • Subject: Re: How to disable gcc automatic inlining ?
  • From: Paul Russell <email@hidden>
  • Date: Tue, 11 Nov 2008 17:01:01 +0000

On 11 Nov 2008, at 15:50, Steve Checkoway wrote:


On Nov 11, 2008, at 5:32 AM, Paul Russell wrote:

How I can I use -O3 optimisation but disable automatic inlining of non-inline functions ? The only workaround I have found so far is to use __attribute__ ((noinline)) on every static function which I want to prevent from being inlined, which is very tedious. Ideally I'd just like a compiler switch which would make this the default behaviour at -O3, so that only explicitly defined inline functions will be inlined, but I can't see anything which controls this in the gcc docs.


-fno-inline-functions

It's listed in the man page.


Thanks - that looks like it ought to work but it doesn't seem to have any effect, at least with Apple's gcc 4.0.1. It would appear that -O3 implies -finline-functions and adding -fno-inline-functions (either before or after the -O3) does not make any difference. I guess it's a bug.


Any other suggestions gratefully received.

Thanks,

Paul

_______________________________________________
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: How to disable gcc automatic inlining ?
      • From: Steve Checkoway <email@hidden>
References: 
 >How to disable gcc automatic inlining ? (From: Paul Russell <email@hidden>)
 >Re: How to disable gcc automatic inlining ? (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: Disk thrashing when opening a project
  • Next by Date: Xcode Book ideas
  • Previous by thread: Re: How to disable gcc automatic inlining ?
  • Next by thread: Re: How to disable gcc automatic inlining ?
  • Index(es):
    • Date
    • Thread