Thread overview
[Issue 23390] value of void initialized variable is unspecified (and not subject to UB)
[Issue 23390] value of void initialized variable is unspecified (and not subject to implementation defined behavior)
Oct 06, 2022
kdevel
Oct 06, 2022
kdevel
Oct 06, 2022
kdevel
Dec 17, 2022
Iain Buclaw
October 06, 2022
https://issues.dlang.org/show_bug.cgi?id=23390

elpenguino+D@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |elpenguino+D@gmail.com

--- Comment #1 from elpenguino+D@gmail.com ---
The current wording allows compilers to put values like NaNs in void initialized variables, to make it easier to catch cases where the value is used before it's set. This change would forbid that, and I don't see any benefit to doing so.

--
October 06, 2022
https://issues.dlang.org/show_bug.cgi?id=23390

kdevel <kdevel@vogtner.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|value of void initialized   |value of void initialized
                   |variable is unspecified     |variable is unspecified
                   |(and not subject to UB)     |(and not subject to
                   |                            |implementation defined
                   |                            |behavior)

--
October 06, 2022
https://issues.dlang.org/show_bug.cgi?id=23390

--- Comment #2 from kdevel <kdevel@vogtner.de> ---
(In reply to elpenguino+D from comment #1)
> The current wording allows compilers to put values like NaNs in void initialized variables, to make it easier to catch cases where the value is used before it's set. This change would forbid that, and I don't see any benefit to doing so.

Sorry for the "UB" in the subject. The documentation says that the value of a void initialized variable is "implementation defined". I corrected the subject.

"implementation defined" means that the implementation documentation ("dmd spec") says what value a variable assumes. I could not find such a documentation.

As far as I recall the terminology for unknown but valid values is "unspecified value". Hence this issue.

--
October 06, 2022
https://issues.dlang.org/show_bug.cgi?id=23390

--- Comment #3 from kdevel <kdevel@vogtner.de> ---
(In reply to kdevel from comment #2)
> As far as I recall the terminology for unknown but valid values is "unspecified value". Hence this issue.

Please delete the "but valid". My last paragraph should read:

   As far as I recall the terminology for unknown values
   is "unspecified value". Hence this issue.

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

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

--
December 15
https://issues.dlang.org/show_bug.cgi?id=23390

--- Comment #4 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dlang.org/issues/3995

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--