[Issue 4169] building dmd with a modern gcc produces a buggy compiler
http://d.puremagic.com/issues/show_bug.cgi?id=4169 Brad Roberts changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #5 from Brad Roberts 2010-05-25 20:55:50 PDT --- Looks like you missed one file's changes: diff --git a/src/mtype.c b/src/mtype.c --- a/src/mtype.c +++ b/src/mtype.c @@ -2832,14 +2832,17 @@ Expression *TypeBasic::defaultInit(Loc loc) * so that uninitialised variables can be * detected even if exceptions are disabled. */ -unsigned short snan[8] = { 0, 0, 0, 0xA000, 0x7FFF }; +union { +unsigned short us[8]; +long doubleld; +} snan = {{ 0, 0, 0, 0xA000, 0x7FFF }}; /* * Although long doubles are 10 bytes long, some * C ABIs pad them out to 12 or even 16 bytes, so * leave enough space in the snan array. */ assert(REALSIZE <= sizeof(snan)); -d_float80 fvalue = *(long double*)snan; +d_float80 fvalue = snan.ld; #endif #if LOGDEFAULTINIT The rest of the compiler builds w/o aliasing warnings on my box from tip of svn now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4234] New: Cannot create a std.socket.Socket from an fd
http://d.puremagic.com/issues/show_bug.cgi?id=4234 Summary: Cannot create a std.socket.Socket from an fd Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: mike.casingh...@gmail.com --- Comment #0 from mike.casingh...@gmail.com 2010-05-25 20:22:40 PDT --- I have a socket fd that is set up for communicating with my parent process, and I need to talk to it. Socket.sock is declared private, and there's no way to access it. Maybe just make it protected or something? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1001] print stack trace (in debug mode) when program die
http://d.puremagic.com/issues/show_bug.cgi?id=1001 --- Comment #21 from Brad Roberts 2010-05-25 15:49:27 PDT --- Submitted as svn r297. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1001] print stack trace (in debug mode) when program die
http://d.puremagic.com/issues/show_bug.cgi?id=1001 --- Comment #20 from Sean Kelly 2010-05-25 15:18:01 PDT --- Not at all. We should really make all of the Runtime properties get/settable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4169] building dmd with a modern gcc produces a buggy compiler
http://d.puremagic.com/issues/show_bug.cgi?id=4169 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #4 from Walter Bright 2010-05-25 15:09:04 PDT --- http://www.dsource.org/projects/dmd/changeset/501 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 242] template implicit template properties doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=242 --- Comment #4 from Don 2010-05-25 13:33:59 PDT --- *** Issue 4233 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4233] Eponymous template template members inaccessible
http://d.puremagic.com/issues/show_bug.cgi?id=4233 Don changed: What|Removed |Added Status|NEW |RESOLVED CC||clugd...@yahoo.com.au Resolution||DUPLICATE --- Comment #1 from Don 2010-05-25 13:33:59 PDT --- This is yet another duplicate of the oldest open DMD enhancement in Bugzilla. It's probably worth voting for bug 242. *** This issue has been marked as a duplicate of issue 242 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1886] Inserting into an AA of structs with opAssign results in ArrayBoundsError
http://d.puremagic.com/issues/show_bug.cgi?id=1886 Don changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #5 from Don 2010-05-25 13:27:52 PDT --- Duplicate of bug 2451. However there is some useful information in the comments for this bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4233] New: Eponymous template template members inaccessible
http://d.puremagic.com/issues/show_bug.cgi?id=4233 Summary: Eponymous template template members inaccessible Product: D Version: 2.041 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: simen.kja...@gmail.com --- Comment #0 from Simen Kjaeraas 2010-05-25 09:23:24 PDT --- template foo( T ) { template foo( U ) { enum foo = is( U == T ); } } static assert( foo!( int )!( int ) ); The above code does not compile, complaining that the ! should not be there. Ok, so I use a FQN: static assert( foo!( int ).foo!( int ) ); Error: undefined identifier template foo(U).foo So apparently, there is no way to get access to the inner foo. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3909] toDelegate handles only a tiny subset of function pointer types
http://d.puremagic.com/issues/show_bug.cgi?id=3909 --- Comment #3 from Max Samukha 2010-05-25 08:12:12 PDT --- (In reply to comment #2) > I just noticed this report now. Really, the reason this code is so poorly > designed (I wrote it, and I'll admit in hindsight that it does suck) is bug > 1818. The stupid mixin hack was a last-minute workaround for this bug and > wasn't thought through properly. This is noted in the comments: > > functional.d around line 550: > > // Workaround for DMD Bug 1818. > mixin("alias " ~ ReturnType!(F).stringof ~ > " delegate" ~ ParameterTypeTuple!(F).stringof ~ " DelType;"); > > version(none) { > // What the code would be if it weren't for bug 1818: > alias ReturnType!(F) delegate(ParameterTypeTuple!(F)) DelType; > } Phobos has recently acquired functionality for extracting storage classes from functions and function parameters. I haven't given it a close look but it seems to do that by parsing mangled names. Hacky but should make it possible to correctly generate function types based on other function types. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3909] toDelegate handles only a tiny subset of function pointer types
http://d.puremagic.com/issues/show_bug.cgi?id=3909 David Simcha changed: What|Removed |Added CC||dsim...@yahoo.com Depends on||1818 --- Comment #2 from David Simcha 2010-05-25 06:29:49 PDT --- I just noticed this report now. Really, the reason this code is so poorly designed (I wrote it, and I'll admit in hindsight that it does suck) is bug 1818. The stupid mixin hack was a last-minute workaround for this bug and wasn't thought through properly. This is noted in the comments: functional.d around line 550: // Workaround for DMD Bug 1818. mixin("alias " ~ ReturnType!(F).stringof ~ " delegate" ~ ParameterTypeTuple!(F).stringof ~ " DelType;"); version(none) { // What the code would be if it weren't for bug 1818: alias ReturnType!(F) delegate(ParameterTypeTuple!(F)) DelType; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2127] inliner turns struct "return *this" from by-value into by-ref (D1 only)
http://d.puremagic.com/issues/show_bug.cgi?id=2127 Brad Roberts changed: What|Removed |Added Attachment #642 is|0 |1 obsolete|| --- Comment #2 from Brad Roberts 2010-05-25 03:05:16 PDT --- Created an attachment (id=643) d2 fix, version 2 Oops.. the version I attached previously was an older copy. This is the newer version that moves the changes down from FuncDeclaration::inlineScan to doInline and fixes a problem with the first version. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2127] inliner turns struct "return *this" from by-value into by-ref (D1 only)
http://d.puremagic.com/issues/show_bug.cgi?id=2127 --- Comment #1 from Brad Roberts 2010-05-25 01:59:48 PDT --- Created an attachment (id=642) tentative fix for this for the d2 branch (might work on d1 as well, untested) This bug exists in the d2 code base as well. This patch fixes the test case and passes the test suite. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1001] print stack trace (in debug mode) when program die
http://d.puremagic.com/issues/show_bug.cgi?id=1001 --- Comment #19 from Brad Roberts 2010-05-25 00:15:31 PDT --- Sean, any objection to me submitting this minor diff: Index: src/object_.d === --- src/object_.d (revision 296) +++ src/object_.d (working copy) @@ -1189,6 +1189,13 @@ traceHandler = h; } +/** + * Return the current trace handler + */ +extern (C) TraceHandler rt_getTraceHandler() +{ +return traceHandler; +} /** * This function will be called when an exception is constructed. The Index: src/core/runtime.d === --- src/core/runtime.d (revision 296) +++ src/core/runtime.d (working copy) @@ -23,6 +23,7 @@ extern (C) void rt_setCollectHandler( CollectHandler h ); extern (C) void rt_setTraceHandler( TraceHandler h ); +extern (C) TraceHandler rt_getTraceHandler(); alias void delegate( Throwable ) ExceptionHandler; extern (C) bool rt_init( ExceptionHandler dg = null ); @@ -172,6 +173,13 @@ rt_setTraceHandler( h ); } +/** + * Return the current trace handler + */ +static TraceHandler traceHandler() +{ +return rt_getTraceHandler(); +} /** * Overrides the default collect hander with a user-supplied version. This This would enable code like this: auto oldTH = Runtime.traceHandler; Runtime.traceHandler = null; scope(exit) Runtime.traceHandler = oldTH; I ran across this 'need' while working on the dmd test suite that is checking some object throwing results, specifically two asserts like this: Object e = new Exception("hello"); assert(e.toString() == "object.Exception: hello"); assert(format(e) == "object.Exception: hello"); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---