https://issues.dlang.org/show_bug.cgi?id=15484
Rainer Schuetze <r.sagita...@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagita...@gmx.de --- Comment #3 from Rainer Schuetze <r.sagita...@gmx.de> --- > Because @nogc isn't supposed to mean "a GC collection cycle will not be > triggered", but rather "no GC code is accessed at all" (which also refers to > GC.enable/disable). My impression is that everybody has a different notion of what @nogc means. Contrary to your assumption, GC.addRoot and GC.addRange have been marked @nogc. The spec only says "@nogc applies to functions, and means that that function does not allocate memory on the GC heap" which still disallows foo() to be @nogc. --