Summary: Compiler (not linker) should generate an error for
                    missing main()
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Don <> 2011-02-14 02:09:54 PST ---
The standard linker error is (a) newbie-hostile; and 
(b) on Windows, it generates an invalid executable. Running this executable
seems to cause an infinite loop you cannot break out of.

As Walter said on the newsgroup, it's not possible to solve this in general:
> The problem is the main() can come from a library, or some other .obj 
> file handed to the compiler that the compiler doesn't look inside. It's 
> a very flexible way to build things, and trying to impose more order on 
> that will surely wind up with complaints from some developers.

But, it's only the trivial case that matters.
The compiler should generate an error if all files passed to the compiler are
.d/.di files, and there is no use of pragma(lib).
Error can be something like:
"No main function, and no .obj or .lib file which could contain one".

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

Reply via email to