[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: |
Stu Bell |
Subject: |
RE: [avr-gcc-list] Re: optimizer removes volatile pin access code. why? |
Date: |
Fri, 30 Oct 2009 11:11:27 -0600 |
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.)
- Re: [avr-gcc-list] optimizer removes volatile pin access code. why?, (continued)
- Re: [avr-gcc-list] optimizer removes volatile pin access code. why?, Joerg Wunsch, 2009/10/27
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Desch, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Desch, 2009/10/28
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Erik Christiansen, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Desch, 2009/10/31
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Erik Christiansen, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/28
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Stu Bell, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/29
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?,
Stu Bell <=
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, df_welch, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/29
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Erik Christiansen, 2009/10/29
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Erik Christiansen, 2009/10/29
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Wunsch, 2009/10/31
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?, Weddington, Eric, 2009/10/31
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?, Joerg Wunsch, 2009/10/31
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?, Weddington, Eric, 2009/10/31
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?, Joerg Wunsch, 2009/10/31
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?, Weddington, Eric, 2009/10/31