Which D compiler is the most maintained and future-proof? [DMD GDC and LDC]

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Jul 24 13:40:14 UTC 2023


On 25/07/2023 1:30 AM, cc wrote:
> Is there any list of known significant "gotchas" with moving to LDC from 
> DMD?  Any unexpected surprises to watch out for or be careful for?  I'm 
> thinking of all the "features" of DMD that are now considered verboten 
> by many users (e.g. compiling with -release, disabling of asserts or 
> array bounds checking, etc). Known edge cases of compiler optimization 
> causing different behavior between vendors?

No, there is no list.

The main gotcha I know of is inline assembly being a bit different. Also 
the glue code for LDC hasn't got ``extern(Objective-C)`` implemented 
currently. I don't know about GDC.

Over all, if you are familiar with GCC & Clang, you'll be ok. A lot of 
the flags from dmd have a comparable version (if not split up further) 
in LDC and GDC.


More information about the Digitalmars-d-learn mailing list