[Issue 22937] identity comparison of strings / struct literals not constant folded

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 21 09:22:57 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22937

--- Comment #2 from Dennis <dkorpel at live.nl> ---
(In reply to mhh from comment #1)
> The frontend should be doing less constant folding not more.

Which operator/type combinations should be constant folded, and why? To me, it
would make sense to constant fold all built in operators on literal values. I
don't expect the compiler to ever generate a runtime addition for '3 + 4', even
in debug builds.

--


More information about the Digitalmars-d-bugs mailing list