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

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

Re: [avr-gcc-list] question about inline function


From: Geoffrey Wossum
Subject: Re: [avr-gcc-list] question about inline function
Date: Mon, 19 Aug 2002 08:43:57 -0500 (CDT)

> > extern inline char foo(void) __attribute__ ((always_inline));
> 
> First of all, extern and inline don't make sense together. It's legal, 
> but the "inline" part will be completely ignored.

Actually, "extern inline" is used when you define inline functions in 
header files.  If you don't specify the extern, the compiler will end up 
compiling the function into every module that includes the header file, 
which will result in multiple declarations errors when you go to link.  
You can check the gcc info pages for more on this.

---
Geoffrey Wossum
Project AKO - http://ako.sf.net

avr-gcc-list at http://avr1.org



reply via email to

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