Add ImportC compiler to dmd

Dibyendu Majumdar mobile at majumdar.org.uk
Mon May 10 10:57:55 UTC 2021


On Sunday, 9 May 2021 at 20:57:06 UTC, Walter Bright wrote:
> https://github.com/dlang/dmd/pull/12507
>
> If you could add a C compiler to dmd with 3000 lines of code, 
> so C code could be imported directly? I would!

Hi Walter

This seems like a good step forward. I would recommend adding an 
in-built C  pre-processor. Maybe port something small like this 
one:

https://github.com/rui314/chibicc/blob/main/preprocess.c

Many people write single header file C programs. With this 
enhancement it will be easy to use all of that code in D.

Regards


More information about the Digitalmars-d mailing list