[Issue 10793] New: Forward reference errors casting from void* to opaque struct pointer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 11 07:31:54 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10793

           Summary: Forward reference errors casting from void* to opaque
                    struct pointer
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: aldacron at gmail.com


--- Comment #0 from Mike Parker <aldacron at gmail.com> 2013-08-11 07:31:53 PDT ---
module forrref;

struct RealFoo {
    int i;
}

struct foo;

void main() {
    auto rf = RealFoo( 10 );
    void* prf = cast( void* )rf;
    foo* f = cast( foo* )prf;
}

forref.d(7): Error: struct forrref.foo unknown size
forref.d(7): Error: struct forrref.foo no size yet for forward reference
forref.d(7): Error: struct forrref.foo unknown size
forref.d(7): Error: struct forrref.foo no size yet for forward reference

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


More information about the Digitalmars-d-bugs mailing list