lkml.org 
[lkml]   [2008]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: optimizing out inline functions
On Wed, 28 May 2008 22:54:47 +0300 "Pekka Enberg" <penberg@cs.helsinki.fi> wrote:

> On Wed, May 28, 2008 at 10:51 PM, Steve French <smfrench@gmail.com> wrote:
> > Is one or the other style (with or without #define of empty function)
> > preferred? Does the compiler optimize both #else clauses out
> > properly? sparse and checkpatch seem to take either
>
> Both are optimized out but empty function is preferred for type checking.

Plus the inlined function can help suppress unused-var warnings because
it counts as a "use".

Sometimes this works the other way and the argument to the macro/inline
just doesn't exist, in which case we're forced to use a macro for the stub.





\
 
 \ /
  Last update: 2008-05-29 10:43    [W:0.042 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site