lkml.org 
[lkml]   [2005]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] include/linux/bio.h: "extern inline" -> "static inline"
Jens Axboe wrote:

>On Tue, Jul 26 2005, Adrian Bunk wrote:
>
>
>>"extern inline" doesn't make much sense.
>>
>>
>
>Yep, thanks.
>
>
>
IIRC, there was a time when the extern inline construct was used to
catch cases where the compiler did not inline the function (you'd get a
link error). Seems like it still works. Try building the attached
files in each of the following ways:

gcc -o foo foo.c

and

gcc -O2 -o foo foo.c

In the first case, you get a link error, because there is no inlining.

-kimball
#include "bar.h"

void foo(void) {
bar();
}

int main(int argc, char *argv[])
{
foo();
return 0;
}
extern inline void bar(void)
{
}
\
 
 \ /
  Last update: 2005-07-27 17:05    [W:0.054 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site