ImportC can now automatically run the preprocessor

Walter Bright newshound2 at digitalmars.com
Sat May 14 21:05:09 UTC 2022


As https://github.com/dlang/dmd/pull/14121 has been merged, the following 
#ImportC program can now be compiled and run:

   #include <stdio.h>

   void main()
   {
     printf("hello ImportC!\n");
   }

It's been a longer and windy-er road than I'd anticipated, but isn't that the 
way all software projects work?

Next up:

1. passing dmd command line arguments to the preprocessor

2. capturing the #define macro dump from the preprocessor, so it can be mined 
for macros that can be translated to D symbols (anticipating leveraging Atila's 
great dpp work on this)


More information about the Digitalmars-d mailing list