No main() Error
Ron Tarrant
rontarrant at gmail.com
Tue Feb 4 09:16:42 UTC 2025
On Sunday, 2 February 2025 at 10:14:15 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> Due to separate compilation, the D compiler cannot know if a
> start address exists with a function provided for it.
>
> The responsibility of this is the linker, which will error if
> no start address with executable code is provided.
I guess I'm not being very clear. I'll try again...
On the first pass, I'd like to suggest that the compiler could
check for an occurrence of "main" followed by "(" and spit out an
error if it's not found.
Any of the following would avoid the error:
```
void main(
<returned type> main (
void main (
```
And other variations thereof.
More information about the dip.ideas
mailing list