force inline/not-inline

via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 27 01:52:00 PDT 2015


On Monday, 27 July 2015 at 02:19:28 UTC, Jonathan M Davis wrote:
> On Sunday, 26 July 2015 at 22:59:49 UTC, Gary Willoughby wrote:
>> It looks like support is being considered:
>>
>> http://dlang.org/pragma.html#inline
>
> Yeah. IIRC, there was a big discussion a few months back on how 
> pragma(inline) worked vs how it should work. In particular, I 
> think that there was a big dispute over whether pragma(inline, 
> true) should force inlining outright or make it so that it gave 
> you an error if it wasn't inlined. I'd have to go find that 
> discussion and dig through it though to know for sure what was 
> being discussed exactly. I paid some attention to it, but not a 
> lot.

The result was that the pragma _forces_ inlining. If the compiler 
cannot inline it for whatever reason, it prints an error and 
exits. This is mostly to accommodate DMD, which has some 
restrictions about which functions can be inlined.


More information about the Digitalmars-d mailing list