Add ImportC compiler to dmd

Dibyendu Majumdar mobile at majumdar.org.uk
Sat May 15 01:11:50 UTC 2021


On Friday, 14 May 2021 at 23:59:27 UTC, Walter Bright wrote:
> On 5/13/2021 10:57 PM, Max Haughton wrote:
>> The only other that I can say is that keep in mind that the 
>> blocker is using C not compiling C. I don't want dmd to be my 
>> C compiler - so you only need to understand GNU extensions 
>> that are used in header files (and don't appear in inline 
>> functions in those headers, but still).
>
> I know, it's just a bonus that it can be used as a standalone C 
> compiler. It's not the point of ImportC. It does, however, make 
> it much easier to test ImportC. And who knows what clever uses 
> people will find for it! I'm always amazed at the things people 
> do with D features.

One suggestion I have is to add a test suite for the C compiler 
so that it is clear how conforming it is to Std C. A bunch of 
tests can be found at:

https://github.com/vnmakarov/mir/tree/master/c-tests




More information about the Digitalmars-d mailing list