Disabling All Inlining in DMD Debug Builds

ryuukk_ ryuukk.dev at gmail.com
Tue Oct 25 15:49:13 UTC 2022


On Tuesday, 25 October 2022 at 08:14:26 UTC, Per Nordlöw wrote:
> On Monday, 24 October 2022 at 20:43:45 UTC, ryuukk_ wrote:
>> I wish we could do ``version(DebugFast | Release)``
>
> Moreover, I've been using, for instance,
>
> ```d
> version(D_Coverage) {} else pragma(inline, true);
> void foo() {}
> ```
>
> to get correct coverage inclusion of `foo()`. Is this still 
> neeed?

The 'else' is easy to miss when reading that code

There must be a better solution than that, ``version`` is just 
too rigid

Looks like OP opened an issue about it: 
https://issues.dlang.org/show_bug.cgi?id=23435


More information about the Digitalmars-d-learn mailing list