[Issue 11881] -betterC switch suffers from bit rot

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 26 10:44:17 PDT 2017


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

--- Comment #19 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to Martin Nowak from comment #18)
> Use `extern(C) int main` to avoid the _d_run_main dependency of the
> generated C main wrapper.

That's right. If you're writing C code, it's better to use the C main()!

Whether the compiler should complain about a D main() in a -betterC compile is
another matter. I'd prefer to defer such issues (and there are several) until
we gain some experience in the field with it.

--


More information about the Digitalmars-d-bugs mailing list