Bug 4005 – std.c.stdlib.exit in CTFE and more

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-03-25T14:43:00Z
Last change time
2015-06-09T05:13:48Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

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.
Comment #2 by bugzilla — 2010-04-01T13:53:48Z
changeset 429
Comment #3 by clugdbug — 2010-04-09T19:17:55Z
Fixed DMD1.058 and DMD2.043.