Thread overview
[Issue 2395] New: spec does not document struct forward declarations (declaring opaque struct type)
Oct 06, 2008
d-bugmail
Oct 06, 2008
d-bugmail
Jan 23, 2012
Walter Bright
October 06, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2395

           Summary: spec does not document struct forward declarations
                    (declaring opaque struct type)
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: tomas@famolsen.dk


I wasn't actually aware this was valid in D:

module test;
struct foobar;
foobar* foo() {
  return null;
}

I thought structs needed a body, I can't find anywhere this is documented as valid, did I miss it?. Also how is this supposed to play with eg. TypeInfo ? The error messages reported by DMD when trying different stuff with one aren't very descriptive.


-- 

October 06, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2395





------- Comment #1 from tomas@famolsen.dk  2008-10-06 07:45 -------
GtkD makes use of this for representing opaque (to GtkD at least) C struct types. They are never defined.


-- 

January 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2395


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |WORKSFORME


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2012-01-22 16:41:05 PST ---
This is now documented.

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