CTFE and BetterC compatibility

Stanislav Blinov stanislav.blinov at gmail.com
Wed Apr 27 14:27:43 UTC 2022


On Wednesday, 27 April 2022 at 14:21:15 UTC, Claude wrote:

This is a long-standing pain point with BetterC (see 
https://issues.dlang.org/show_bug.cgi?id=19268).

As for this:

> If I compile without the BetterC switch, compilation actually 
> works but I'll have some linker issues:
> ```
> $ gcc test.d -o test
> First digit=5
> /tmp/ccuPwjdv.o : In function 
> « _D5test5parseFNaAyaZS5test4Data » :
> test.d:(.text+0x137) : undefined reference to « _d_arraybounds »
> test.d:(.text+0x183) : undefined reference to « _d_arraybounds »
>
> etc...
> ```

When not using BetterC, but not linking against druntime either, 
you have to provide your own implementation for those functions. 
This is e.g. so you can replace druntime with your own version.


More information about the Digitalmars-d-learn mailing list