Thread overview
[Issue 11142] New: Wrong error message "no size yet for forward reference" for opaque struct
Sep 30, 2013
Kenji Hara
Sep 30, 2013
Kenji Hara
Sep 30, 2013
Andrej Mitrovic
September 30, 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@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@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: -------
September 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11142


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-09-29 20:04:54 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2598

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11142



--- Comment #2 from github-bugzilla@puremagic.com 2013-09-30 11:31:04 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/099e606bb2cf9e4d32437481589d989041a8726a
fix Issue 11142 - Wrong error message "no size yet for forward reference" for
opaque struct

https://github.com/D-Programming-Language/dmd/commit/e5b6d2293948b57407c7ef86bbf39670d5e0a5d4 Merge pull request #2598 from 9rnsr/fix11142

Issue 11142 - Wrong error message "no size yet for forward reference" for opaque struct

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11142


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich@gmail.com
         Resolution|                            |FIXED


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