On 11/9/21 5:19 PM, Stefan Koch wrote:
On Tuesday, 9 November 2021 at 21:03:20 UTC, Steven Schveighoffer wrote:
On 11/9/21 3:05 PM, Stefan Koch wrote:


Yes it is valid C.
It is not valid D though.


The file is named `tomld.c`

The way importC works is, you pass a .c file to the compiler, and it treats it as C.


It rather tries to interpret the C code as D code.
It's not a full C compiler rather it's a shim in front of the D frontend.
Therefore bugs like the above can happen if the compiler wasn't aware that the function identifier was to be interpreted in "C context"

I'm not sure where this conversation is going. ImportC is supposed to compile C files. Any case where it doesn't compile C files (at least standards-conforming ones) is a bug.

-Steve

Reply via email to