www.digitalmars.com         C & C++   DMDScript  

D - anonymous enum symbol clash crash bug.

reply "Mike Wynn" <mike.wynn l8night.co.uk> writes:
the compiler (Beta v0.68) will crash the the GPF

The instruction at "0x004040FF" referenced memory at "0x00000000". the
memory could not be "read".

when two modules define an anonymous enum with the same symbols.
`dmd -c test1` will  crash as described, if you have these two files.

---- test1.d -----
import windows;
import test1lib;

class foo {

 void crash() {
  RedrawWindow( null, null, null,


--------- test1lib.d -----------
module test1lib;

enum {
// * RedrawWindow() flags
RDW_INVALIDATE          =0x0001,
RDW_INTERNALPAINT       =0x0002,
RDW_ERASE               =0x0004,

RDW_VALIDATE            =0x0008,
RDW_NOERASE             =0x0020,

RDW_NOCHILDREN          =0x0040,
RDW_ALLCHILDREN         =0x0080,

RDW_UPDATENOW           =0x0100,
RDW_ERASENOW            =0x0200,

RDW_FRAME               =0x0400,
RDW_NOFRAME             =0x0800
Jul 30 2003
parent "Walter" <walter digitalmars.com> writes:
Thanks, I'll take it from here. -Walter
Jul 30 2003