Add ImportC compiler to dmd

Ola Fosheim Grostad ola.fosheim.grostad at gmail.com
Mon May 10 08:09:23 UTC 2021


On Monday, 10 May 2021 at 02:12:02 UTC, Adam D. Ruppe wrote:
> If you can get some of that #define stuff to just work, then 
> maybe we can merge this and iterate on it from there.

You could add a syntax for embedding C function defs or even C 
expressions in D code and run only that through cpp. Then make D 
declarations available to C by making a C extension.

However... If it takes years to fix D issues, then this whole 
project is likely to not be used in serious projects as it will 
be viewed as less reliable than just manually creating wrappers.

It makes more sense to reuse clang and emit llvm IR.


More information about the Digitalmars-d mailing list