flag -ignore_nogc to allow breaking nogc rules during debugging [analog to debug for pure]

Timothee Cour via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 10 01:17:20 PST 2016


this would make error handling trivial and solve issues such as this:

FORUM:formatted assert error messages inside nogc functions
http://forum.dlang.org/thread/CANri+EyNyrhMWGCSqZHx_vXDJFSrwhOrV=J2kaTZ6t9-upTAtg@mail.gmail.com

usage:

during development:
dmd -debug -ignore_nogc other_flags foo.d
during release:
dmd other_flags foo.d

@nogc
void test(int a){

version(ignore_nogc)
  assert(a==1, text("a = ", a));
else
  assert(a==1, "a = ?");

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160110/d8577da8/attachment-0001.html>


More information about the Digitalmars-d mailing list