www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2395] New: spec does not document struct forward declarations (declaring opaque struct type)

reply d-bugmail puremagic.com writes:
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.


-- 
Oct 06 2008
parent d-bugmail puremagic.com writes:
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.


-- 
Oct 06 2008