Potential of a compiler that creates the executable at once

max haughton maxhaton at gmail.com
Thu Feb 10 22:11:13 UTC 2022


On Thursday, 10 February 2022 at 22:06:30 UTC, Dave P. wrote:
> On Thursday, 10 February 2022 at 09:41:12 UTC, rempas wrote:
>> [...]
>
> I think it would be interesting to combine a compiler and a 
> linker into a single executable. Not necessarily for speed 
> reasons, but for better diagnostics and the possibility of type 
> checking external symbols. Linker errors can sometimes be hard 
> to understand in the presence of inlining and optimizations. 
> The linker will report references to symbols not present in 
> your code or present in completely different places.
>
> [...]

This goes away if you do a debug build, which most (all 
professionals I'm aware of) people do.

And why should the compiler do something the linker is going to 
do anyway? It would have to wait until after linking anyway 
because you might want a symbol to be defined somewhere else.


More information about the Digitalmars-d mailing list