dmd icon indicating copy to clipboard operation
dmd copied to clipboard

Always implicitly add 'return 0' to extern(C) main functions

Open ibuclaw opened this issue 2 years ago • 1 comments

I'm not sure why we need -betterC in order to do this.

It is possible to have:

module object;
extern(D) void main() { }
extern(C) void main() { }

And it's expected that the program should return 0.

ibuclaw avatar Jul 17 '23 15:07 ibuclaw

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#15428"

dlang-bot avatar Jul 17 '23 15:07 dlang-bot