Thread overview | ||||||
---|---|---|---|---|---|---|
|
December 04, 2004 Compiler crash v.108 | ||||
---|---|---|---|---|
| ||||
I don't know if this is related to Dave's post but the following causes a crash in Win2k, DMD .108 struct Header { int xsize, ysize; int height() { return ysize; } int width() { return xsize; } } void main( char[][] arg ) { Header header; int total = header.width * header.height; ubyte[total] colors; // color indexed bitmap data } |
December 04, 2004 Re: Compiler crash v.108 | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock | David Medlock wrote:
> I don't know if this is related to Dave's post but the following causes a crash in Win2k, DMD .108
>
> struct Header
> {
> int xsize, ysize;
>
> int height() { return ysize; }
> int width() { return xsize; }
> }
>
>
> void main( char[][] arg )
> {
> Header header;
> int total = header.width * header.height;
> ubyte[total] colors; // color indexed bitmap data
> }
FYI: Changing colors to a dynamic array doesn't cause the compiler to fault.
|
December 05, 2004 Re: Compiler crash v.108 | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock | On Sat, 04 Dec 2004 12:31:40 -0500, David Medlock <amedlock@nospam.org> wrote: > David Medlock wrote: >> I don't know if this is related to Dave's post but the following causes a crash in Win2k, DMD .108 >> struct Header >> { >> int xsize, ysize; >> int height() { return ysize; } >> int width() { return xsize; } >> } >> void main( char[][] arg ) >> { >> Header header; >> int total = header.width * header.height; >> ubyte[total] colors; // color indexed bitmap data >> } > > FYI: Changing colors to a dynamic array doesn't cause the compiler to fault. Hmm, that should complain that total isn't const anyway, shouldn't it? Does on my dmd 1.07 on XP... -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up" |
December 05, 2004 Re: Compiler crash v.108 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simon Buchan | On Sun, 05 Dec 2004 20:52:09 +1300, Simon Buchan <currently@no.where> wrote: > On Sat, 04 Dec 2004 12:31:40 -0500, David Medlock <amedlock@nospam.org> wrote: > >> David Medlock wrote: >>> I don't know if this is related to Dave's post but the following causes a crash in Win2k, DMD .108 >>> struct Header >>> { >>> int xsize, ysize; >>> int height() { return ysize; } >>> int width() { return xsize; } >>> } >>> void main( char[][] arg ) >>> { >>> Header header; >>> int total = header.width * header.height; >>> ubyte[total] colors; // color indexed bitmap data >>> } >> >> FYI: Changing colors to a dynamic array doesn't cause the compiler to fault. > > Hmm, that should complain that total isn't const anyway, shouldn't it? > Does on my dmd 1.07 on XP... > Scratch that, stuffed up the update last time (whoops!) Confirm fails with 1.07, complains 1.06. -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up" |
Copyright © 1999-2021 by the D Language Foundation