[Issue 14954] New: extern opaque struct instance doesn't compile
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 24 03:52:13 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14954
Issue ID: 14954
Summary: extern opaque struct instance doesn't compile
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
Let's say I have some C headers that have code like this in:
extern struct UndeclaredStruct blah;
UndeclaredStruct *p = &blah;
which would naïvely translate to D as:
struct UndeclaredStruct;
extern(C) __gshared extern UndeclaredStruct blah;
__gshared auto p = &blah;
which doesn't compile:
Error: variable opaque.blah no definition of struct UndeclaredStruct
--
More information about the Digitalmars-d-bugs
mailing list