Compiler Explorer Assembly Output for C, C++ and D (dlang)
Dennis
dkorpel at gmail.com
Thu May 27 10:43:16 UTC 2021
On Thursday, 27 May 2021 at 10:27:42 UTC, Tariq Siddiqui wrote:
> Thanks for your answer, -betterC works well with simple code
> but when using templates in code -betterC compilation failed.
Templates are supported in -betterC, what's not supported can be
found here:
https://dlang.org/spec/betterc.html#consequences
You're probably using or importing something that depends on
Druntime.
For LDC, you can try adding this instead of using `-betterC`:
```
pragma(LDC_no_moduleinfo);
```
Though once you use non-betterC functions, your assembly will
easily get messy compared to C's assembly.
More information about the Digitalmars-d-learn
mailing list