Comment #0 by bearophile_hugs — 2010-03-25T14:43:18Z
What's the right behaviour for this program? I think the CTFE has to stop, but dmd v2.042 doesn't stop to me:
import std.c.stdlib: exit;
int foo() {
exit(1);
return 100;
}
static assert(foo() == 100);
void main() {
assert(foo() == 100);
exit(1);
}
Comment #1 by clugdbug — 2010-03-30T11:57:58Z
The bug is quite different: CTFE calls to void functions without source code don't generate any error messages, so they are effectively ignored.