January 11, 2024 [Issue 24327] New: LDC --nogc | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24327 Issue ID: 24327 Summary: LDC --nogc Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: minor Priority: P1 Component: tools Assignee: nobody@puremagic.com Reporter: black80@bk.ru import core.stdc.stdio; class C { @nogc: public: this() { printf( "C.C\n"); } ~this() { printf( "C.~C\n"); } } void main() @nogc { printf( "=> main\n"); scope(exit) printf( "<= main\n"); scope c = new C(); // LOC 14 } //------------------------- ldc2 file.d - OK ldc2 --nogc file.d: file.d(14): Error: No implicit garbage collector calls allowed with -nogc option enabled: `_d_callfinalizer` shouldn't check/call GC for scope vars -- |
Copyright © 1999-2021 by the D Language Foundation