Hi,
I tested with the below mentioned code("inline.c") to understand about
inline functions.
I explicitly instructed gcc to translate inline.c to inline.s.
Next I removed the inline keyword from inline.c and re-created the
inline.s file, but I don’t see any difference in the assembly code. Is
it correct behavior?
Could you guys point few good examples to understand the concept of inline?
#include <stdio.h>
static inline int MAX(int x, int y) { return x > y ? x : y; }
static void test1(void);
int main(void)
{
test1();
return 0;
}
static void test1(void)
{
printf("MAX(2,6) = %d\n",MAX(2,6));
}
--
Thanks,
Sekhar
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies