[Issue 14419] [CTFE] Need infinite loop detection?
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Apr 6 09:24:14 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14419
--- Comment #3 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
at least there is sense to make CTFE fail early when it tries to evaluate
function with inappropriate return value. the original sample was this:
alias extern(C) immutable void function () VectorFunc;
VectorFunc[3] g_pfnVectors = [
Reset_Handler,
];
extern(C) void Reset_Handler () {
while (true) {}
}
there is no sense to evaluate `Reset_Handler`, as it's return value (actually,
absense of) is not suitable as array element.
--
More information about the Digitalmars-d-bugs
mailing list