Bug 11142 – Wrong error message "no size yet for forward reference" for opaque struct

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-29T20:01:00Z
Last change time
2013-09-30T11:31:11Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-09-29T20:01:26Z
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
Comment #1 by k.hara.pg — 2013-09-29T20:04:54Z
Comment #2 by github-bugzilla — 2013-09-30T11:31:04Z
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