template function inlining in g++ version < 4.0

Stephan Tolksdorf andorxor@gmx.de
Fri Jun 29 09:24:00 GMT 2007


Stephan Tolksdorf wrote:
> Now I'm having difficulties understanding when exactly this bug is 
> triggered. Could maybe someone explain to me under which circumstances 
> GCC 3.4 fails to inline a templated function? Are there any general 
> workarounds? Is there any chance that the compiler inlines code even 
> though always_inline fails?

Seems like the problems I had were caused by using 
"__attribute__((always_inline))" without an accompanying "inline".

Stephan



More information about the Gcc-help mailing list