Re: Inlining function pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yavuz yetim <yavuzyetim@xxxxxxxxxxx> writes:

> I tried it on Mac OS X gcc-4.0.1 (I guess). The compiler complained. 

Sounds like a bug in that relatively old compiler.

> Now I'm in the office and I just tried it with "gcc version 4.3.3
> (Ubuntu 4.3.3-5ubuntu4)" and it compiled fine. So, it's probably an
> issue with the old compiler. But the question is, even though it
> compiles, can it inline both of the functions? The assembly output
> shows that it doesn't either of them, but I don't know if it is the
> right place to look:

When I compile your test case with gcc mainline, it inlines both
functions into main.

> trash$gcc  -finline-functions -S den.c

You need to compile with optimization (the -O option)--simply specifying
-finline-functions is insufficient.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux