avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] Getting inline to work


From: eric
Subject: [avr-gcc-list] Getting inline to work
Date: Thu, 22 May 2003 15:45:35 GMT

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.

I've taken a look at the GCC manual here:
<http://gcc.gnu.org/onlinedocs/gcc-
3.3/gcc/Inline.html#Inline>
and I can't figure out what I'm doing wrong.

Any ideas?

Thanks
Eric




reply via email to

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