www.digitalmars.com         C & C++   DMDScript  

D - compiler error with typedef'd fixed length arrays inside structs

The following code will give a compiler error ("Internal error:
..\ztc\cgcod.c 1751") in version 0.76:

typedef float[2] UV;

struct INFO {
 UV uv;

void func (UV uv) {

void main (char[][] args) {
 INFO info;

It doesn't matter if I initialize info.  Also, the error goes away if UV is
typedef'd to be float[] instead of float[2].

Am I using struct properly?  It will still implicitly allocate onto the
stack in the above instance, right? I'm not sure if I fully grok D's array
and struct changes yet.  Does the physical layout of INFO contain the length
of UV in addition to the two elements?

Dan L.
Dec 05 2003