This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Preventing link time optimization from inlining
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Adam <adam dot j dot lewis at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 21 Dec 2012 10:41:03 +0100
- Subject: Re: Preventing link time optimization from inlining
- References: <4FEC066E-63E9-46D5-AFD8-BFF9335F2ED7@gmail.com>
On Thu, Dec 20, 2012 at 5:33 PM, Adam <adam.j.lewis@gmail.com> wrote:
> Hi,
>
> When using -flto is there a way to tell gcc to not inline a particular function? attribute noinline appears to have no effect. I am using gcc 4.7.2. The use case is for certain functions that cause optimization problems when they are inlined. An example is when the function is throwing a c++ exception.
attribute noinline should have the desired effect (you may need
noclone as well).
Richard.
> Thanks,
> Adam