[Issue 12034] New: Union and inlining leads to erroneous "Error: variable used before set"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 29 10:59:10 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12034

           Summary: Union and inlining leads to erroneous "Error: variable
                    used before set"
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: aliloko at gmail.com


--- Comment #0 from ponce <aliloko at gmail.com> 2014-01-29 10:59:06 PST ---
How to reproduce:

---
import std.numeric;

alias CustomFloat!16 half_t;

union half_ushort
{
    half_t f;
    ushort i;
}

void fun()
{
    half_t asHalf = 0;
    half_ushort hu = void;
    hu.f = asHalf;         
}
---

Present in both DMD 2.065b2 and DMD 2.064.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list