November 01, 2002
I ran across this in DLI 0.1.1, I have no clue whether it's a DLI or DMD bug.

The following code will crash dli with the message
"machine-i386.cpp(1885): struct, dumping core..."

struct foo {}
foo[100] bar;
int main() {
        return 0;
}

However, if I make 'bar' a dynamic array and allocate it in main with "bar = new foo[100];" then it works fine.

--
The Villagers are Online! http://villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]


November 01, 2002

Russ Lewis wrote:
> I ran across this in DLI 0.1.1, I have no clue whether it's a DLI or DMD
> bug.
> 
> The following code will crash dli with the message
> "machine-i386.cpp(1885): struct, dumping core..."
> 
> struct foo {}
> foo[100] bar;
> int main() {
>         return 0;
> }
> 
> However, if I make 'bar' a dynamic array and allocate it in main with
> "bar = new foo[100];" then it works fine.

It was my fault, fixed now.  Walter's internal API for struct initialisers is... uh... inconsistent.