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

          Issue ID: 22831
           Summary: No error for malformed extern(C) main function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

DMD silently accepts extern(C) main functions with arbitrary arguments / return
type. The spec[1] exlicitly requires one of the following forms:

extern (C) int main() { ... }
extern (C) int main(int argc, char** argv) { ... }

[1] https://dlang.org/spec/function.html#betterc-main

--

Reply via email to