dmd 1.056 and 2.040 release
    Yao G 
    foo at bar.com
       
    Sat Jan 30 08:25:47 PST 2010
    
    
  
Walter Bright Wrote:
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.056.zip
> 
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.040.zip
> 
> Thanks to the many people who contributed to this update!
Looks like this doesn't work anymore with this release (D2):
---
module Foo;
import core.runtime;
import std.c.windows.windows;
class Bar {}
extern(Windows)
int WinMain(HINSTANCE instance, HINSTANCE, LPSTR cmdLine, int cmdShow )
{
    void exceptionHandler(Throwable e) {
        throw e;
    }
    Runtime.initialize( &exceptionHandler );
    
    auto foo = new Foo();
    
    Runtime.terminate ( &exceptionHandler );
    return 0;
}
---
When I run the program it "segfaults" with the following message (when I debug it):
Unhandled Exception: EXCEPTION_ACCESS VIOLATION(0xc000005) at object._moduleCtor2.ModuleInfo
The exception is thrown from the runtime initializer. It used to work with the previous DMD version (2.039). I think that the change of ModuleInfo from class to struct somehow affected this (just speculating).
I did a wrapper for the Windows API and now none of my programs run when I use DMD 2.040. Damn, I was excited by the new @disable attribute. :(
    
    
More information about the Digitalmars-d-announce
mailing list