[Issue 15542] pure function with no argument returning different values (with void-initialized static array)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jan 19 10:45:15 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15542
Marc Schütz <schuetzm at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schuetzm at gmx.net
--- Comment #1 from Marc Schütz <schuetzm at gmx.net> ---
Quoting https://dlang.org/spec/declaration.html#VoidInitializer :
"If the Initializer is void, however, the variable is not initialized. If its
value is used before it is set, undefined program behavior will result."
Note how it says "undefined program behavior", not even "undefined value". So
technically, the current behaviour is within the spec.
--
More information about the Digitalmars-d-bugs
mailing list