On Monday 22 October 2007 23:42, Roland Dreier wrote:
> Something is fishy with your compilation process. __always_inline
> should never be visible to gcc; it is a macro defined in <linux/compiler.h>.
>
Might this be a gcc installation problem?
I have the following file (foobar.c):
==============
static __always_inline int foo(int i) {return (i+1); }
int main(void) { return foo(5); }
==============
If I just do: gcc foobar.c,
I get the following output:
foobar.c:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘int’
If I modify the file to:
==============
static __attribute__((always_inline)) int foo(int i) {return (i+1); }
int main(void) { return foo(5); }
==============
and do gcc foobar.c,
the compilation succeeds.
I'm using gcc (GCC) 4.1.0 (SUSE Linux), on SLES 10.
-- Jack
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general