[Issue 11142] New: Wrong error message "no size yet for forward reference" for opaque struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 29 20:01:28 PDT 2013


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

           Summary: Wrong error message "no size yet for forward
                    reference" for opaque struct
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-09-29 20:01:26 PDT ---
>From fail_compilation/fail91.d

struct S;

void main()
{
    S* s = new S();
}

Prints:
fail_compilation/fail91.d(13): Error: struct fail91.S unknown size
fail_compilation/fail91.d(13): Error: struct fail91.S no size yet for forward
reference

However, "no size yet for forward reference" is a wrong message, because opaque
struct size never be calculated during compilation.

So, the code should print:
fail_compilation/fail91.d(13): Error: struct fail91.S unknown size

-- 
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