Re: ImportC automatic preprocessor?

2023-07-27 Thread Iain Buclaw via D.gnu

On Wednesday, 26 July 2023 at 04:35:43 UTC, Chris Piker wrote:
Is that a feature that is likely, or unlikely, to be added to a 
future version of GDC?




I expect it to be incremental.  There's a POC implementation that 
uses the built-in preprocessor that already exists in gdc 
(libcpp), initially none of the C-specific target macros would be 
exposed though - this is one arcane part of gcc/g++ that needs 
rewriting because at the moment using it just opens a [pandora's 
box](https://github.com/gcc-mirror/gcc/blob/31d18ff44244d1fe3ae913a5a1957d82059cb328/gcc/fortran/cpp.cc#L189-L200) (even in other front-end languages).




ImportC automatic preprocessor?

2023-07-25 Thread Chris Piker via D.gnu

Hi GDC

Over at: https://gcc.gnu.org/onlinedocs/gdc/Missing-Features.html 
I read that GDC doesn't invoke the preprocessor automatically:


```
ImportC Limitations

GNU D does not run the preprocessor automatically for any 
ImportC sources. Instead all C files are expected to be manually 
preprocessed before they are imported into the compilation.

```

Is that a feature that is likely, or unlikely, to be added to a 
future version of GDC?


Thanks,