[Issue 18598] cyclic constructor calls have undefined behavior but are accepted in @safe code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 20 12:25:27 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18598

--- Comment #2 from ag0aep6g <ag0aep6g at gmail.com> ---
(In reply to Walter Bright from comment #1)
> I don't know a way to assign defined behavior to overflowing the stack :-(

Is that a problem for normal (non-constructor) functions as well?

----
void f() @safe { g(); }
void g() @safe { f(); }
void main() @safe { f(); } /* Undefined behavior? */
----

--


More information about the Digitalmars-d-bugs mailing list