[Bug 184] New: Cannot forward reference typedef within struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 8 04:37:06 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=184

           Summary: Cannot forward reference typedef within struct
           Product: D
           Version: 0.160
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: deewiant at gmail.com


struct vegetarian {
        carrots areYummy;
}

typedef ptrdiff_t carrots;

--

The above code fails to compile, producing the error "size of type ptrdiff_t is
not known" twice.

Changing the typedef to an alias or placing it before the struct causes it to
compile correctly.

I can't think of a good reason for why this would be an actual limitation, so I
think it's a bug.


-- 




More information about the Digitalmars-d-bugs mailing list