AnsweredAssumed Answered

#pragma INLINE

Question asked by Giacomo Petrini on Nov 25, 2009
Latest reply on Nov 25, 2009 by Erich Styger

Hello, I'm using CW 6.2 on a HS08QE16.

 

I've a function in foo.c:

 

#pragma INLINE

void bar(void)

{

      //do something short 

 

Compiler has the -Oi flag. 

 

Now, if' I call this function within foo.c, it's inlined.

But if I use it on another file (for example main.c) it's not inlined. And I wish that it will be inlined everywhere.

In foo.h there is simply the declaration:

void bar(void);

 

I tried using extern:

extern void bar(void);

but it doesn't change anything.

 

Some ideas?

 

Thanks Bye Jack 

Outcomes