DIP56 Provide pragma to control function inlining

Walter Bright newshound2 at digitalmars.com
Sun Feb 23 12:29:19 PST 2014


On 2/23/2014 5:06 AM, Joseph Rushton Wakeling wrote:
> So, if I understand right, a pragma(inline, true)
> anywhere inside a function adds a compiler hint to always inline this function,
> while with false it's a hint to _never_ do so, and no pragma at all gives the
> usual compiler-decides situation?

I'll add:

     pragma(inline);

meaning revert to default behavior.


> Question: what happens if someone is daft enough to put both true and false
> inside the same function?

The last one wins.



More information about the Digitalmars-d mailing list