[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?

From: Weddington, Eric
Subject: RE: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?
Date: Sun, 1 Nov 2009 23:49:50 -0700


> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Joerg Wunsch
> Sent: Sunday, November 01, 2009 11:25 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] Re: optimizer removes volatile 
> pin access code.why?
> David Brown <address@hidden> wrote:
> > It might be worth filing a report for a better clarification in the
> > documentation (does that need a bug report?) to make it clearer that
> > "always_inline" has no effect without a normal "inline" declaration.

This is what the GCC 4.3.2 manual says:

    Generally, functions are not inlined unless optimization is specified. For 
functions declared inline, this attribute inlines the function even if no 
optimization level was specified.

So it does say "for functions declared inline". With this description, the 
"always_inline" attribute is really affecting how the optimization works, not 
how inlining works per se, i.e. one still has to mark the function as "inline" 
for inlining to happen. The always_inline attribute tells the optimizer to 
inline even at -O0, which apparently is not the default behaviour.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]