[Issue 4118] New: std.conv.to!SomeStruct("hello") crashes compiler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 24 11:15:57 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4118

           Summary: std.conv.to!SomeStruct("hello") crashes compiler
           Product: D
           Version: 2.041
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: michel.fortin at michelf.com


--- Comment #0 from Michel Fortin <michel.fortin at michelf.com> 2010-04-24 14:15:55 EDT ---
The program below crashes with "Bus error" when trying to compile from the
command line on Mac OS X 10.6.3. I know this was not crashing the compiler a
few versions ago (some time early january 2010).

---
import std.conv;

struct SomeStruct { }

void main() {
    auto s = to!SomeStruct("hello");
}
---

It is a real problem for me that it crashes the compiler since I'm using a
__traits(compile, ...) with something similar for conditional compilation, and
this does not work anymore.

---
import std.conv;

struct SomeStruct { }

void main() {
    static if (__traits(compiles, to!SomeStruct("hello"))) {
        auto s = to!SomeStruct("hello");
    }
}
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list