Thread overview
[Issue 20811] Regression as of 2.066.0 - CTFE static variable retained across calls
May 08, 2020
Basile-z
May 09, 2020
Ketmar Dark
Dec 17, 2022
Iain Buclaw
Dec 17, 2022
Iain Buclaw
Dec 20, 2022
Dlang Bot
Dec 21, 2022
Dlang Bot
Jan 01, 2023
Dlang Bot
May 08, 2020
https://issues.dlang.org/show_bug.cgi?id=20811

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com

--- Comment #1 from Basile-z <b2.temp@gmx.com> ---
> having a compile-time counter like this can actually be pretty useful

There was a plan to add a new primary exp for counting, see the defunct PR https://github.com/dlang/dmd/pull/10131/files.

The problem with a CTFE counter is that it must allow static CTFE variables, this is not correct. global and mutable states are forbidden in CTFE, they can only change in a function body

--
May 09, 2020
https://issues.dlang.org/show_bug.cgi?id=20811

Ketmar Dark <ketmar@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar@ketmar.no-ip.org

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

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

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
           Severity|normal                      |regression

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

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ibuclaw created dlang/dmd pull request #14729 "fix Issue 20811 - Regression as of 2.066.0 - CTFE static variable retained across calls" fixing this issue:

- fix Issue 20811 - Regression as of 2.066.0 - CTFE static variable retained across calls

https://github.com/dlang/dmd/pull/14729

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

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #14729 "fix Issue 20811 - Regression as of 2.066.0 - CTFE static variable retained across calls" was merged into stable:

- 6205ad3ebcc936545ae623ec1527dc1fe95cf804 by Iain Buclaw:
  fix Issue 20811 - Regression as of 2.066.0 - CTFE static variable retained
across calls

https://github.com/dlang/dmd/pull/14729

--
January 01, 2023
https://issues.dlang.org/show_bug.cgi?id=20811

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #14765 "merge stable" was merged into master:

- 1f286b9cec6c83bf24028113407aee057f4d357a by Iain Buclaw:
  fix Issue 20811 - Regression as of 2.066.0 - CTFE static variable retained
across calls

https://github.com/dlang/dmd/pull/14765

--