What is going on in this code?

Daniel Kozak via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 14 06:33:06 PDT 2016


On Thursday, 14 April 2016 at 13:30:42 UTC, Daniel Kozak wrote:
> On Thursday, 14 April 2016 at 13:08:56 UTC, Carlin wrote:
>> On Thursday, 14 April 2016 at 10:29:43 UTC, ag0aep6g wrote:
>>> [...]
>>
>> Thanks, that works perfectly! I couldn't figure it out and I 
>> knew I had to be missing something really basic. I still don't 
>> understand though why it works in release but not in debug.
>
> because with release build dub will enable inlining. So I guess 
> there is a stack frame elimination

So if you add this:
pragma(inline, false)

before ubyte[] serialize(uint t)

It should not work even with release build type


More information about the Digitalmars-d mailing list