Different function attributes between debug and release build

Jerry via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 8 13:04:26 PDT 2016


On Thursday, 7 July 2016 at 19:39:12 UTC, Lodovico Giaretta wrote:
> Currently, std.string.assumeUTF is inferred @nogc in release 
> mode, while in debug mode it isn't. Should this be allowed?
> It can cause some problems, e.g. I have some @nogc unittests 
> that I use to guarantee that my code is in fact @nogc, and 
> these fail because in debug mode assumeUTF is not.
> In general (IMHO) this kind of difference should be avoided, 
> because code should not change meaning between debug and 
> release modes.
>
> What do you think?

That is definetly a bug.


More information about the Digitalmars-d mailing list