February 05, 2006 Bad enum compiler crash (0.145) | ||||
---|---|---|---|---|
| ||||
There seems to be a bug with poorly defined enums that causes an actual crash in the compiler (win32 - 0.145) enum Flags1 { ZERO = 0, ONE = 1, TWO = 2, } // Sloppy C/C++ importing, should be FALSE = Flags1.ZERO, enum Flags2 { FALSE = ZERO, TRUE = ONE, } The compiler knows that line 13 has ZERO as undefined, but the following null ptr reference is generated: The instruction at "0x0040d412" referenced memory at "0x00000000". The memory could not be written. |
February 05, 2006 Re: Bad enum compiler crash (0.145) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert.AtkinsonNO | Robert.AtkinsonNO@SPAMgmail.com wrote: > There seems to be a bug with poorly defined enums that causes an actual crash in the compiler (win32 - 0.145) > > enum Flags1 > { > ZERO = 0, > ONE = 1, > TWO = 2, > } > > // Sloppy C/C++ importing, should be FALSE = Flags1.ZERO, > enum Flags2 > { > FALSE = ZERO, > TRUE = ONE, > } > > The compiler knows that line 13 has ZERO as undefined, but the following null ptr reference is generated: > > The instruction at "0x0040d412" referenced memory at "0x00000000". The memory could not be written. > > Confirmed. Segfaults on linux with version 0.145, works fine with 0.139. |
Copyright © 1999-2021 by the D Language Foundation