digitalmars.D.bugs - Bad enum compiler crash (0.145)
- Robert.AtkinsonNO SPAMgmail.com Feb 05 2006
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.
Feb 05 2006
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.
Feb 05 2006








=?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid>