Thread overview
[Issue 22937] identity comparison of strings / struct literals not constant folded
May 21, 2022
mhh
May 21, 2022
Dennis
Dec 17, 2022
Iain Buclaw
May 21, 2022
https://issues.dlang.org/show_bug.cgi?id=22937

mhh <maxhaton@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxhaton@gmail.com

--- Comment #1 from mhh <maxhaton@gmail.com> ---
Is it a bug though?

The frontend should be doing less constant folding not more.

--
May 21, 2022
https://issues.dlang.org/show_bug.cgi?id=22937

--- Comment #2 from Dennis <dkorpel@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.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=22937

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--