On Friday, 10 October 2025 at 10:06:39 UTC, felixfxu wrote:
But that introduce another question: dmd is not a complete gcc replacement I guess, but in the headers, all `#ifdef __GNUC__` is `true`, it will have problems for code like this:

As a workaround, you can use [DMD's `-P` switch][1] and [GCC's `-U` switch][2] to disable any macros that cause problems. For example, `-P=-U__GNUC__` would disable the `__GNUC__` macro.

[1]: https://dlang.org/dmd-linux.html#switch-P
[2]: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-U

Reply via email to