Mail Archives: djgpp/1998/01/30/21:49:38
Reinier Heeres wrote:
>
> I have the idea that DJGPP isnt't inlining my hline routine in my
> program, but I have defined it like this:
>
> inline void hline(int x1,int x2,int y,unsigned char c)
>
> and I compile and link with the -finline-fnuctions flag...
>
> Does anybody have an idea how this might happen (the functions that call
> hline() are in the same module)
The compiler has the ultimate discretion as to whether a given function
merits inlining or not. There are various criteria (see "info gcc "c
extensions" inline"), but gcc may well have decided that your hline()
function is too complex to be inlined, and therefore refuses to do it.
Without seeing the actual code, there's no way to be absolutely certain.
If you want to test whether hline() is being inlined, you can instruct
the compiler to stop before the assembly stage, and output an assembly
language file, with the '-S' option. Looking over this should tell you
what you need to know.
hth!
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| "Starting flamewars since 1993" | http://www.cs.com/fighteer/ |
| *** NOTICE *** This .signature | ICQ UIN#: 7406319 |
| is generated randomly. If you don't like it, sue my computer. |
---------------------------------------------------------------------
- Raw text -