|
| From: | David Gay |
| Subject: | Re: [avr-gcc-list] Getting inline to work |
| Date: | Thu, 22 May 2003 09:36:21 -0700 |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314 |
address@hidden wrote:
Hello all
I'm having a difficult time trying to get inline to work.
I have:
// prototypes
static inline void foo(void);
static void bar(void);
static inline void foo(void)
{
//...
}
static void bar(void)
{
//...
foo();
//...
foo();
//...
foo();
//...
}
I use -std=gnu99 -Os as well as -Winline and I don't get
any warnings / errors and the listing shows that bar is
*calling* foo; i.e. foo isn't getting inlined.
Try -finline-limit=<your favourite number>, or -O2. With -Os, avr-gcc has a *very low* limit on the size of functions it will inline.
David Gay address@hidden
| [Prev in Thread] | Current Thread | [Next in Thread] |