https://issues.dlang.org/show_bug.cgi?id=23390
Issue ID: 23390
Summary: value of void initialized variable is unspecified (and
not subject to UB)
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dlang.org
Assignee: [email protected]
Reporter: [email protected]
Source: https://forum.dlang.org/post/[email protected]
| >> I got the answer thanks to IRC chat:
https://dlang.org/spec/declaration.html#void_init
| > Quote:
| >
| > Implementation Defined: If a void initialized variable's value is used
| > before it is set, its value is implementation defined.
| >
| > Shouldn't this read
| >
| > Unspecified Value: If a void initialized variable's value is used
| > before it is set, its value is unspecified.
|
| Yes, it should. Many of the contributors to the D spec are not very well
| versed in the precise details of these terms, so mistakes like this
| occasionally slip through.
--