David Brown wrote:

> > Returns the following error:
> > 
> > CmdFocus.c: In function 'FcsAcquireLookForSumOKDeassert':
> > CmdFocus.c:4020: sorry, unimplemented: inlining failed in call to
> > 'FcsStartUtilTimer': function body not available
> > CmdFocus.c:4152: sorry, unimplemented: called from here ...
> > 
> 
> That's hardly "throwing a fit" - it's simply telling you it 
> can't obey the "always_inline" attribute.

Okay, bad humor day.  Sorry. 

> However, I think the problem stems from a misunderstanding 
> about "always_inline" - it's an /additional/ request to the 
> compiler that you can use for /inline/ functions.  From the 
> gcc documentation:
> 
> 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.
> 
> 
> If you declare your functions "inline", it should work as you 
> desire even with -O0:
> 
> static inline void
> FcsStartUtilTimer( uint16_t Wait ) 
> __attribute__((always_inline)); static inline void 
> FcsStartUtilTimer( uint16_t Wait )

Ah ha, that's it!  I read that description several times and never quite
got it.  Thanks for setting me straight, Dave!

Best regards, 

Stu Bell 
DataPlay (DPHI, Inc.) 

 


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

Reply via email to