> -----Original Message-----
> From: 
> avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.org 
> [mailto:avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.
> org] On Behalf Of Joerg Wunsch
> Sent: Sunday, November 01, 2009 11:25 PM
> To: avr-gcc-list@nongnu.org
> Subject: Re: [avr-gcc-list] Re: optimizer removes volatile 
> pin access code.why?
> 
> David Brown <da...@westcontrol.com> 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:

always_inline
    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.


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to