Summary: std.c.stdlib.exit in CTFE
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-08-26 06:25:39 PDT ---
This enhancement request comes from bug 4005

Currently (dmd 2.048) the following program prints:
test.d(3): Error: exit cannot be interpreted at compile time, because it has no
available source code
test.d(6): Error: cannot evaluate foo() at compile time
test.d(6): Error: static assert  (foo() == 100) is not evaluatable at compile

import std.c.stdlib: exit;
int foo() {
    return 100;
static assert(foo() == 100);
void main() {}

I'd like exit() to work at compile-time too, and stop the compilation
gracefully (dmd return value is the value given to exit()).

See also bug 3952

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to