www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19580] New: [non-DMD] std.random seed bootstrap: don't count


          Issue ID: 19580
           Summary: [non-DMD] std.random seed bootstrap: don't count on
                    reading an uninitialized variable being treated as an
                    ordinary read
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

Calculations that transform an uninitialized variable may be omitted by LDC
when optimizations are enabled. This is allowed by the standard so even though
this does not affect DMD it should be avoided.


If a void initialized variable's value is used before it is set, the behavior
is undefined.
Jan 13 2019