Re: extern opaque struct

2015-08-24 Thread John Colvin via Digitalmars-d
On Monday, 24 August 2015 at 04:08:28 UTC, Daniel Murphy wrote: "John Colvin" wrote in message news:uhpgjffttsuqeswyj...@forum.dlang.org... Let's say I have some C headers that have code like this in: extern struct UndeclaredStruct blah; Undeclared *p = &blah; which would naïvely translate

Re: extern opaque struct

2015-08-23 Thread Artur Skawina via Digitalmars-d
On 08/24/15 00:20, John Colvin via Digitalmars-d wrote: > Let's say I have some C headers that have code like this in: > > extern struct UndeclaredStruct blah; > Undeclared *p = &blah; > > which would naïvely translate to D as: > > struct UndeclaredStruct; > extern UndeclaredStruct blah; > auto

Re: extern opaque struct

2015-08-23 Thread Daniel Murphy via Digitalmars-d
"John Colvin" wrote in message news:uhpgjffttsuqeswyj...@forum.dlang.org... Let's say I have some C headers that have code like this in: extern struct UndeclaredStruct blah; Undeclared *p = &blah; which would naïvely translate to D as: struct UndeclaredStruct; extern UndeclaredStruct blah; a

Re: extern opaque struct

2015-08-23 Thread John Colvin via Digitalmars-d
On Sunday, 23 August 2015 at 22:20:26 UTC, John Colvin wrote: Let's say I have some C headers that have code like this in: extern struct UndeclaredStruct blah; Undeclared *p = &blah; which would naïvely translate to D as: struct UndeclaredStruct; extern UndeclaredStruct blah; auto p = &blah;

extern opaque struct

2015-08-23 Thread John Colvin via Digitalmars-d
Let's say I have some C headers that have code like this in: extern struct UndeclaredStruct blah; Undeclared *p = &blah; which would naïvely translate to D as: struct UndeclaredStruct; extern UndeclaredStruct blah; auto p = &blah; which doesn't compile. Why not? Neither the size nor any defaul