From d-bugmail at puremagic.com Mon Jul 1 00:39:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 07:39:37 +0000 (UTC) Subject: [Issue 6169] [CTFE] pure functions cannot compute constants using functions not marked as pure In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6169 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #14 from monarchdodra at gmail.com 2013-07-01 00:39:34 PDT --- Not fully fixed for @safe. The conditions to reproduce are a bit complicated actually. It requires attribute inference, mixin and default args (!) I'm not sure which it is that it producing the problem: -------- string bar(string op = "+") @property { return "a" ~ op ~ "b"; } void foo()() { int a, b; int c = mixin(bar); } @safe void main() { foo!()(); } -------- main.d(14): Error: safe function 'D main' cannot call system function 'main.foo!().foo' -------- Observations: 1) The problem is only with @safe, not pure. 2) Calling "min(bar("+"))" also makes the problem go away. Built with HEAD from 30-06-2013 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 01:08:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 08:08:00 +0000 (UTC) Subject: [Issue 10519] New: Stray-paren in doc-unittest code generates wrong document Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10519 Summary: Stray-paren in doc-unittest code generates wrong document Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ddoc Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-01 01:07:59 PDT --- The example code generates wrong html. Code: ---- /// void foo() {} /// unittest { auto s = "1 + (2 * (3 + 1 / 2)"; assert(!balancedParens(s, '(', ')')); } ---- Generated test.html ---- test

test



$(DDOC_MODULE_MEMBERS
void foo();
Examples:
auto s = "1 + (2 * (3 + 1 / 2)");
assert(!balancedParens(s, '(', ')'));




Page generated by Ddoc. ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 01:15:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 08:15:43 +0000 (UTC) Subject: [Issue 10519] Stray-paren in doc-unittest code generates wrong document In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10519 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-01 01:15:42 PDT --- https://github.com/D-Programming-Language/dmd/pull/2287 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 01:43:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 08:43:40 +0000 (UTC) Subject: [Issue 10475] destructor is called on 'for' loop variable even when initialization failed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10475 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, wrong-code --- Comment #3 from Kenji Hara 2013-07-01 01:43:37 PDT --- https://github.com/D-Programming-Language/dmd/pull/2286 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 01:49:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 08:49:18 +0000 (UTC) Subject: [Issue 10520] New: Building with profiler results in "is not nothrow" error on some contracts Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10520 Summary: Building with profiler results in "is not nothrow" error on some contracts Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: verylonglogin.reg at gmail.com --- Comment #0 from Denis Shelomovskij 2013-07-01 12:49:17 MSD --- Some in/out contracts causes "is not nothrow" error when building with "-profile". The only compiler output e.g. for: --- ... void copyFrom(R)(R r) if(isInputRange!R && is(ElementType!R == T)) out { assert(func(_buff)); } body { _buff = r.array(); } ... --- is: --- ..\utils.d(nnn): Error: 'utils.Type!X.Type.func' is not nothrow --- Workaround: Disable these contracts or move its code to function body. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 02:28:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 09:28:54 +0000 (UTC) Subject: [Issue 10150] Prefix method 'this' qualifiers should be just ignored anytime In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10150 --- Comment #14 from Dicebot 2013-07-01 02:28:51 PDT --- (In reply to comment #11) > Typ? "Both", then you state two different things. Both free function and method. > AFAIK, anything returnable can be qualified with const, so there would be no > fall through case. I don't know if const(void) is valid, but at least pure is applicable to return type only when it is one of function types so it will fall through. I am not speaking only about const, all attributes should behave consistently. > What about: > > -------- > struct S > { > const nothrow pure > T foo(); > > nothrow pure const > T bar(); > } > -------- > > What does (should) foo return? What about bar? both return const(T) (at the very least, I have no idea what T is). When I am speaking about postfix qualifier I mean "T bar() const pure nothrow" > The current rules are obvious: stand alone attribute => Function. > Simple and obvious. > There is no reasons for "const" to get special treatment. No, they are more like "stand alone attribute -> function or no-op, you'd better be careful!". And breaks similarity with C/C++ principle. And makes your code needlessly "Lisp-y". Behaviour has been very confusing all the time but at least it slapped me into face every time I tried to type stuff in a more natural syntax. Not any more. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 03:01:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 10:01:06 +0000 (UTC) Subject: [Issue 7227] [] syntax for empty associative array too? In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7227 --- Comment #4 from bearophile_hugs at eml.cc 2013-07-01 03:01:04 PDT --- yebblies commented on GitHub: > Ideally this would not be the same as K[V] aa = null;, > it would behave like K[V] aa = new K[V]; - an AA would be allocated. I think this is a bad idea, because then the semantics of D code changes if you use [] instead of null. D associative arrays have troubles: void test(int[int] arraya, int x) { arraya[x] = x; } void main() { int[int] d; test(d, 0); int[int] d0; assert(d == d0); // d is empty, 0:0 is lost d[1] = 1; test(d, 2); assert(d == [1: 1, 2: 2]); // now 2:2 is not lost } Compared to the output of this Python code: def test(arraya, x): arraya[x] = x def main(): d = {} test(d, 0) assert d == {0: 0} d[1] = 1 test(d, 2) assert d == {0: 0, 1: 1, 2: 2} main() Such problems should be faced in other ways. Making the associative array literal semantics even more complex is not helping. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 04:54:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 11:54:51 +0000 (UTC) Subject: [Issue 10150] Prefix method 'this' qualifiers should be just ignored anytime In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10150 --- Comment #15 from monarchdodra at gmail.com 2013-07-01 04:54:50 PDT --- (In reply to comment #14) > > What about: > > > > -------- > > struct S > > { > > const nothrow pure > > T foo(); > > > > nothrow pure const > > T bar(); > > } > > -------- > > > > What does (should) foo return? What about bar? > > both return const(T) (at the very least, I have no idea what T is). When I am > speaking about postfix qualifier I mean "T bar() const pure nothrow" Well, such a change would break existing code that is correct and respects the spec. I'm not sure changing the semantics of such code would be acceptable. D allows attributes to be placed either prefix or postfix. Forcing "const" to only work right hand side is a C++ holdover. There should be no difference where you place it. If anything, I find it weird when I find code that is written like: "pure @property T foo() const" Why place the const there? Put it on the left, that's where you placed everything else... > > The current rules are obvious: stand alone attribute => Function. > > Simple and obvious. > > There is no reasons for "const" to get special treatment. > > No, they are more like "stand alone attribute -> function or no-op, you'd > better be careful!". And breaks similarity with C/C++ principle. I agree both are problem. I happen to think the better solution is that no-op becomes explicit compile error. This is both safe, and doesn't add special positional casing. > And makes your > code needlessly "Lisp-y". Don't know lisp. > Behaviour has been very confusing all the time but at least it slapped me into > face every time I tried to type stuff in a more natural syntax. Not any more. I agree we should be slapped in the face every time we type something wrong. Currently, being slapped in the face for wrong postfix is good. Also being slapped for wrong prefix would be better. The solution of saying "prefix applies to return value", would be a big interface change. Even where we to agree it is the right decision, I don't think it could acceptable change. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 05:29:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 12:29:08 +0000 (UTC) Subject: [Issue 10506] Purity should not be checked in a mixin statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10506 --- Comment #4 from Andrej Mitrovic 2013-07-01 05:29:06 PDT --- (In reply to comment #3) > This is issue 6169, which was fixed a while ago. I don't know what compiler > version you were using but I double-checked the source and it calls > ctfeSemantic like it should. > > *** This issue has been marked as a duplicate of issue 6169 *** Let's try this: ----- import std.string; void test() pure { mixin(["int ", "x;"].join()); } void main() {} ----- 2.061: ok 2.062: Error: pure function 'test' cannot call impure function 'join' 2.063: Error: pure function 'test' cannot call impure function 'join' 2.064: ok (but I think this is because join has become pure?) Note that the test-case in Issue 6169 works in all of these compilers, but not the sample I gave. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 06:00:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 13:00:49 +0000 (UTC) Subject: [Issue 10506] Purity should not be checked in a mixin statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10506 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #5 from monarchdodra at gmail.com 2013-07-01 06:00:47 PDT --- (In reply to comment #4) > (In reply to comment #3) > > This is issue 6169, which was fixed a while ago. I don't know what compiler > > version you were using but I double-checked the source and it calls > > ctfeSemantic like it should. > > > > *** This issue has been marked as a duplicate of issue 6169 *** > > Let's try this: > > ----- > import std.string; > > void test() pure > { > mixin(["int ", "x;"].join()); > } > > void main() {} > ----- > > 2.061: ok > 2.062: Error: pure function 'test' cannot call impure function 'join' > 2.063: Error: pure function 'test' cannot call impure function 'join' > 2.064: ok (but I think this is because join has become pure?) > > Note that the test-case in Issue 6169 works in all of these compilers, but not > the sample I gave. I have reopened 6169 with this usecase: -------- string bar(string op = "+") @property { return "a" ~ op ~ "b"; } void foo()() { int a, b; int c = mixin(bar); } @safe void main() { foo!()(); } -------- main.d(14): Error: safe function 'D main' cannot call system function 'main.foo!().foo' -------- Observations: 1) The problem is only with @safe, not pure. 2) Calling "min(bar("+"))" also makes the problem go away. -------- Not sure if this is strictly 6169 or if I should have posted here and un-resolved as duplicate. But in any case, this is (I think) a simpler use case. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 06:03:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 13:03:14 +0000 (UTC) Subject: [Issue 10506] Purity should not be checked in a mixin statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10506 --- Comment #6 from yebblies 2013-07-01 23:03:13 EST --- (In reply to comment #4) > > Let's try this: > > ----- > import std.string; > > void test() pure > { > mixin(["int ", "x;"].join()); > } > > void main() {} > ----- > > 2.061: ok > 2.062: Error: pure function 'test' cannot call impure function 'join' > 2.063: Error: pure function 'test' cannot call impure function 'join' > 2.064: ok (but I think this is because join has become pure?) > > Note that the test-case in Issue 6169 works in all of these compilers, but not > the sample I gave. Ah, I think I know what's going on. Does it possibly work in 2.063 when not using ufcs? I think it's only getting the direct calls to semantic, but some others are being missed (eg resolveProperties) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 06:10:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 13:10:14 +0000 (UTC) Subject: [Issue 10506] Purity should not be checked in a mixin statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10506 --- Comment #7 from Andrej Mitrovic 2013-07-01 06:10:13 PDT --- (In reply to comment #6) > Does it possibly work in 2.063 when not using ufcs? No, I get the same results. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 06:30:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 13:30:37 +0000 (UTC) Subject: [Issue 10475] destructor is called on 'for' loop variable even when initialization failed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10475 --- Comment #4 from Nils 2013-07-01 06:30:35 PDT --- (In reply to comment #2) > *** This issue has been marked as a duplicate of issue 8563 *** (In reply to comment #3) > https://github.com/D-Programming-Language/dmd/pull/2286 Does that patch fix issue 8563 or is this issue not a proper duplicate of 8563? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 06:49:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 13:49:48 +0000 (UTC) Subject: [Issue 10150] Prefix method 'this' qualifiers should be just ignored anytime In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10150 --- Comment #16 from Dicebot 2013-07-01 06:49:46 PDT --- (In reply to comment #15) > The solution of saying "prefix applies to return value", would be a big > interface change. Even where we to agree it is the right decision, I don't > think it could acceptable change. You have asked what it my opinion about "how it should behave", not about "what can be released" ;) I don't expect this to change, it is a design mistake with roots too ancient to shake it. But I at least want it to remind me every time about it, not fail silently. This pull request was a disaster. Actually, paying even more attention to initial enhancement description I see no valid use case. "const: void foo() {}" - this should be an error, nothing convenient about letting it go. P.S. By "Lisp-y" I have meant excessive () bracket usage. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 07:01:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 14:01:18 +0000 (UTC) Subject: [Issue 10475] destructor is called on 'for' loop variable even when initialization failed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10475 --- Comment #5 from Kenji Hara 2013-07-01 07:01:17 PDT --- (In reply to comment #4) > (In reply to comment #2) > > *** This issue has been marked as a duplicate of issue 8563 *** > > (In reply to comment #3) > > https://github.com/D-Programming-Language/dmd/pull/2286 > > Does that patch fix issue 8563 or is this issue not a proper duplicate of 8563? Because I couldn't reproduce segfault in Windoes 7 64bit (== 32bit codegen) environment. Right now I don't have x86_64 environment, so currently I don't have enough confidence that the PR fixes bug 8563... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 07:47:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 14:47:24 +0000 (UTC) Subject: [Issue 10506] Purity should not be checked in a mixin statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10506 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Status|RESOLVED |REOPENED Resolution|DUPLICATE | --- Comment #8 from Kenji Hara 2013-07-01 07:47:23 PDT --- https://github.com/D-Programming-Language/dmd/pull/2289 Essentially this issue has been caused by the incomplete fix for bug 6169. But the actual issue is very small, so I'd like to keep this independent from that. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 08:01:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 15:01:21 +0000 (UTC) Subject: [Issue 6169] [CTFE] pure functions cannot compute constants using functions not marked as pure In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6169 --- Comment #15 from Kenji Hara 2013-07-01 08:01:17 PDT --- (In reply to comment #14) > Not fully fixed for @safe. The conditions to reproduce are a bit complicated > actually. It requires attribute inference, mixin and default args (!) I'm not > sure which it is that it producing the problem: https://github.com/D-Programming-Language/dmd/pull/2290 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 09:45:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 16:45:00 +0000 (UTC) Subject: [Issue 10521] New: Struct wrong constructor chosen. Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10521 Summary: Struct wrong constructor chosen. Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: damianday at hotmail.co.uk --- Comment #0 from Damian 2013-07-01 09:44:59 PDT --- // Test case, worked fine in 2.062 struct Test { enum DefaultSize = 256; int size; this(int sz = DefaultSize ) { size = sz; } } void main() { Test st_test; assert(st_test.size == Test.DefaultSize); // Wrong constructor chosen! } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 09:54:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 16:54:39 +0000 (UTC) Subject: [Issue 10521] Struct wrong constructor chosen. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10521 Damian changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 10:16:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 17:16:47 +0000 (UTC) Subject: [Issue 10521] Struct wrong constructor chosen. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10521 --- Comment #1 from Damian 2013-07-01 10:16:46 PDT --- This is a correct test case, ignore the previous one. Anyway tested now with Git Head and the issue has been resolved! Hooray :) struct Test { enum DefaultSize = 256; int size; this(int sz = DefaultSize ) { size = sz; } ~this() { assert(size == DefaultSize); } } public class ClassA { private Test st_test; public this() { st_test = Test(256); } } void main() { auto cl = new ClassA; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 10:23:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 17:23:23 +0000 (UTC) Subject: [Issue 10517] readln(Char)(Char[] buf) accepts non-mutable buffers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10517 --- Comment #1 from monarchdodra at gmail.com 2013-07-01 10:23:22 PDT --- https://github.com/D-Programming-Language/phobos/pull/1381 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 10:41:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 17:41:14 +0000 (UTC) Subject: [Issue 10510] enforce can't take an extern(C) function to call In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10510 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull AssignedTo|nobody at puremagic.com |andrej.mitrovich at gmail.com --- Comment #1 from Andrej Mitrovic 2013-07-01 10:41:13 PDT --- https://github.com/D-Programming-Language/phobos/pull/1382 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 11:06:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 18:06:18 +0000 (UTC) Subject: [Issue 10510] enforce can't take an extern(C) function to call In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10510 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-01 11:06:17 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/62f6459b49c5fba36eafeee7da28d440a186b915 Fix Issue 10510 - enforce should take any callable function without regard for calling conventions. https://github.com/D-Programming-Language/phobos/commit/141b234e5246f08d53484face5076f92df8833c2 Merge pull request #1382 from AndrejMitrovic/Fix10510 Issue 10510 - enforce should take any callable function -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 11:09:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 18:09:38 +0000 (UTC) Subject: [Issue 10510] enforce can't take an extern(C) function to call In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10510 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 12:01:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 19:01:17 +0000 (UTC) Subject: [Issue 6646] [SafeD] array.reserve is not @safe/trusted In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6646 --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-01 12:01:16 PDT --- IMO, reserve() should be at least @trusted. What's the use of safeD if even language constructs like array.reserve can't be used? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 12:05:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 19:05:01 +0000 (UTC) Subject: [Issue 5207] Immutability is broken in constructors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5207 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-01 12:05:00 PDT --- Isn't this by design? In my understanding, ctors allow you to assign once, and thereafter further assignment is prohibited. Otherwise, you couldn't have runtime-initialized immutables, such as AA's. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 12:12:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 19:12:16 +0000 (UTC) Subject: [Issue 6407] take(map) problem In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6407 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-01 12:12:15 PDT --- This bug appears to be fixed in latest git HEAD (and probably last release as well)? Bearophile, could you re-test this against the latest release and close the bug if it doesn't happen anymore? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 12:27:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 19:27:29 +0000 (UTC) Subject: [Issue 6471] std.metastrings.Format has recursive expansion problems In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6471 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-01 12:27:28 PDT --- Now that std.format is CTFE-able, std.metastrings has been deprecated. Maybe this bug can be closed? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 12:43:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 19:43:47 +0000 (UTC) Subject: [Issue 10270] dmd's posix.mak has incorrect dependencies In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10270 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |hsteoh at quickfur.ath.cx Resolution| |WORKSFORME --- Comment #5 from hsteoh at quickfur.ath.cx 2013-07-01 12:43:46 PDT --- I just did a bunch of make -j6 with DMD this weekend, and it seems to work now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 12:49:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 19:49:40 +0000 (UTC) Subject: [Issue 6407] take(map) problem In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6407 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |monarchdodra at gmail.com Resolution| |FIXED --- Comment #3 from monarchdodra at gmail.com 2013-07-01 12:49:39 PDT --- (In reply to comment #2) > This bug appears to be fixed in latest git HEAD (and probably last release as > well)? Bearophile, could you re-test this against the latest release and close > the bug if it doesn't happen anymore? Works for me for as far back as at least 2.061. I'll close it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 13:27:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 20:27:44 +0000 (UTC) Subject: [Issue 6646] [SafeD] array.reserve is not @safe/trusted In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6646 Steven Schveighoffer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schveiguy at yahoo.com --- Comment #2 from Steven Schveighoffer 2013-07-01 13:27:43 PDT --- It should be @trusted. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 15:00:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 22:00:09 +0000 (UTC) Subject: [Issue 10522] New: __FILE__ and other special keywords cannot be used with printf Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10522 Summary: __FILE__ and other special keywords cannot be used with printf Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-01 15:00:08 PDT --- ----- import std.stdio; void main() { printf("-- %s\n", __FILE__); printf("-- %s\n", __FUNCTION__); printf("-- %s\n", __PRETTY_FUNCTION__); } ----- > object.Error: Access Violation The use-case are printf statements in destructors, which unlike writef will avoid any allocations (which typically fail in dtors due to the GC being stopped). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 15:37:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 1 Jul 2013 22:37:09 +0000 (UTC) Subject: [Issue 10523] New: Don't call array op functions for short vector ops Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10523 Summary: Don't call array op functions for short vector ops Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-01 15:37:08 PDT --- The D front-end performs some vector ops like a[]+b[] with a call to functions like __arraySliceSliceAddSliceAssign_d. For more complex array operations like a[]+b[]+c[] there is no available function, so the D front-end replaces them with a loop. When the vector ops are done on fixed sized arrays that are small, the back-end of gcd and ldc2 compilers are able to produce (very) efficient code from a loop. So I suggest to replace _all_ vector ops with a loop when the arrays have a length known at compile time and such length is small (where small is <= 16). This avoids to kill the optimization opportunities for ldc2 and gdc back-ends. And probably improves the performance of the code even for dmd compiler for arrays like 4 integers or 4 doubles long. This is not a general solution for this problem, but I think it's very simple to implement, and improves significantly a wide class of common cases. I can call it a very low hanging fruit. - - - - - - - - - - - Below there is some data to support my request. The ldc2 compiler is generally a good enough optimizing compiler, it's able to unroll loops, it should perform some vectorizations or some de-virtualizations, it will be able to perform link-time optimization, etc. For this small program: import core.stdc.stdio: printf; void main() { double[4] a = void, b = void, c = void; a[] = 1.0; b[] = 2.0; c[] = a[] + b[]; printf("%f %f %f %f\n", c[0], c[1], c[2], c[3]); } ldc2 gives, on a X86: __Dmain: pushl %ebp movl %esp, %ebp andl $-8, %esp subl $136, %esp movl $1072693248, 108(%esp) movl $0, 104(%esp) movl $1072693248, 116(%esp) movl $0, 112(%esp) movl $1072693248, 124(%esp) movl $0, 120(%esp) movl $1072693248, 132(%esp) movl $0, 128(%esp) movl $1073741824, 76(%esp) movl $0, 72(%esp) movl $1073741824, 84(%esp) movl $0, 80(%esp) movl $1073741824, 92(%esp) movl $0, 88(%esp) movl $1073741824, 100(%esp) movl $0, 96(%esp) leal 104(%esp), %eax movl %eax, 20(%esp) leal 72(%esp), %eax movl %eax, 12(%esp) leal 40(%esp), %eax movl %eax, 4(%esp) movl $4, 16(%esp) movl $4, 8(%esp) movl $4, (%esp) calll __arraySliceSliceAddSliceAssign_d movsd 40(%esp), %xmm0 movsd 48(%esp), %xmm1 movsd 56(%esp), %xmm2 movsd 64(%esp), %xmm3 movsd %xmm3, 28(%esp) movsd %xmm2, 20(%esp) movsd %xmm1, 12(%esp) movsd %xmm0, 4(%esp) movl $_.str, (%esp) calll ___mingw_printf xorl %eax, %eax movl %ebp, %esp popl %ebp ret The first group of movl are the initializations of the two arrays "a", "b" (dmd calls __memset64 for this. But for such small arrays this can be a bit faster): movl $1072693248, 108(%esp) movl $0, 104(%esp) movl $1072693248, 116(%esp) movl $0, 112(%esp) movl $1072693248, 124(%esp) movl $0, 120(%esp) movl $1072693248, 132(%esp) movl $0, 128(%esp) movl $1073741824, 76(%esp) movl $0, 72(%esp) movl $1073741824, 84(%esp) movl $0, 80(%esp) movl $1073741824, 92(%esp) movl $0, 88(%esp) movl $1073741824, 100(%esp) Then there is a preparation for calling a druntime function that performs the vector op, including the array lengths: movl $4, 16(%esp) movl $4, 8(%esp) movl $4, (%esp) The call: calll __arraySliceSliceAddSliceAssign_d And then it prepares the call to printf (I don't know why there are 8 movsd instead of 4): movsd 40(%esp), %xmm0 movsd 48(%esp), %xmm1 movsd 56(%esp), %xmm2 movsd 64(%esp), %xmm3 movsd %xmm3, 28(%esp) movsd %xmm2, 20(%esp) movsd %xmm1, 12(%esp) movsd %xmm0, 4(%esp) movl $_.str, (%esp) calll ___mingw_printf This is a similar program that uses a loop instead of vector ops: import core.stdc.stdio: printf; __gshared double x0 = 1.0, x1 = 2.0, x2 = 3.0, x3 = 4.0, y0 = 10.0, y1 = 20.0, y2 = 30.0, y3 = 40.0; void main() { double[4] a = [x0, x1, x2, x3]; double[4] b = [y0, y1, y2, y3]; double[4] c = void; foreach (i; 0 .. 4) c[i] = a[i] + b[i]; printf("%f %f %f %f\n", c[0], c[1], c[2], c[3]); } Currently LLVM has some vectorization capabilities, but apparently ldc2 is not able to use two addpd instructions (or one vaddpd) like this: movapd 208(%esp), %xmm0 movapd 224(%esp), %xmm1 addpd 176(%esp), %xmm0 addpd 192(%esp), %xmm1 movhpd %xmm1, 28(%esp) movlpd %xmm1, 20(%esp) movhpd %xmm0, 12(%esp) movlpd %xmm0, 4(%esp) movl $_.str, (%esp) calll ___mingw_printf So currently ldc2 generates code like this for the manual loop, with four addsd: movsd 136(%esp), %xmm0 movsd 144(%esp), %xmm1 addsd 104(%esp), %xmm0 addsd 112(%esp), %xmm1 movsd 152(%esp), %xmm2 addsd 120(%esp), %xmm2 movsd 160(%esp), %xmm3 addsd 128(%esp), %xmm3 movsd %xmm3, 28(%esp) movsd %xmm2, 20(%esp) movsd %xmm1, 12(%esp) movsd %xmm0, 4(%esp) movl $_.str, (%esp) calll ___mingw_printf Even four addsd are faster than the call to __arraySliceSliceAddSliceAssign_d. I think the cause of the problem is that the back-end of ldc2 doesn't receive the lengths (that are 4) of the arrays, that are known at compile-time. A simple solution is just to not call functions like __arraySliceSliceAddSliceAssign_d when the length of the arrays is known to be small, and just inline a small loop. The D front-end is already able to do this when there is no run-time function available: import core.stdc.stdio: printf; __gshared double x0 = 1.0, x1 = 2.0, x2 = 3.0, x3 = 4.0, y0 = 10.0, y1 = 20.0, y2 = 30.0, y3 = 40.0, z0 = 100.0, z1 = 200.0, z2 = 300.0, z3 = 400.0; void main() { double[4] a = [x0, x1, x2, x3]; double[4] b = [y0, y1, y2, y3]; double[4] c = [z0, z1, z2, z3]; double[4] d = void; foreach (i; 0 .. 4) d[i] = a[i] + b[i] + c[i]; printf("%f %f %f %f\n", d[0], d[1], d[2], d[3]); } movsd 200(%esp), %xmm0 movsd 208(%esp), %xmm1 addsd 168(%esp), %xmm0 addsd 176(%esp), %xmm1 addsd 144(%esp), %xmm1 movsd 216(%esp), %xmm2 addsd 184(%esp), %xmm2 addsd 152(%esp), %xmm2 movsd 224(%esp), %xmm3 addsd 192(%esp), %xmm3 addsd 160(%esp), %xmm3 movsd 136(%esp), %xmm4 movsd %xmm3, 28(%esp) movsd %xmm2, 20(%esp) movsd %xmm1, 12(%esp) addsd %xmm0, %xmm4 movsd %xmm4, 4(%esp) movl $_.str, (%esp) calll ___mingw_printf -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 17:12:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 00:12:27 +0000 (UTC) Subject: [Issue 6471] std.metastrings.Format has recursive expansion problems In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6471 --- Comment #3 from Ellery Newcomer 2013-07-01 17:12:25 PDT --- Depends on whether you consider it a dmd issue or a phobos issue. I just took a second look at this and.. you get a recursion depth of exactly 500 for templates. I don't recall this restriction being documented anywhere, so if it isn't, it should be, and after that maybe take up the question of whether it is an acceptable restriction (with ctfe maybe it is now). import std.string; enum s = "abcdefghijklmorpshtn"; static assert(s.length == 20); enum t = s ~ s; static assert(t.length == 40); enum u = t ~ t; static assert(u.length == 80); enum v = u ~ u; static assert(v.length == 160); enum w = v ~ v; static assert(w.length == 320); enum x = w ~ v ~ s; static assert(x.length == 500); /* // ok! enum x = w ~ v ~ s[1..$]; static assert(x.length == 499); */ template iter(string s, T) { static if(s.length == 0) { enum iter = ""; }else{ enum iter = toUpper(s[0..1]) ~ iter!(s[1..$], T); } } pragma(msg, iter!(x, int)); void main() {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 17:56:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 00:56:13 +0000 (UTC) Subject: [Issue 10524] New: case and with() isn't work together Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10524 Summary: case and with() isn't work together Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: 4denizzz at gmail.com --- Comment #0 from mimocrocodil <4denizzz at gmail.com> 2013-07-01 17:56:12 PDT --- struct S { int field; } void main() { int a = 1; S struct_with_long_name; switch( a ) { case 0: struct_with_long_name.field = 444; // ok break; with( struct_with_long_name ) { case 1: field = 555; // segfault break; } default: break; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 18:11:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 01:11:27 +0000 (UTC) Subject: [Issue 7656] ddoc misinterprets commented parentheses in an example In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7656 --- Comment #3 from Kenji Hara 2013-07-01 18:11:26 PDT --- (In reply to comment #1) > https://github.com/D-Programming-Language/dmd/pull/1244 That was once merged, but was reverted so it had caused a regression: https://github.com/D-Programming-Language/dmd/pull/1244#issuecomment-11162068 New pull request: https://github.com/D-Programming-Language/dmd/pull/2287 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 18:11:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 01:11:44 +0000 (UTC) Subject: [Issue 7715] DDoc eats $1, $2, $3 etc. inside d_code section In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7715 --- Comment #6 from Kenji Hara 2013-07-01 18:11:43 PDT --- (In reply to comment #5) > Sorry, it was reverted due to a regression > (https://github.com/D-Programming-Language/dmd/pull/1244#issuecomment-11162068). > Will work on it again soon. New pull request: https://github.com/D-Programming-Language/dmd/pull/2287 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 18:30:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 01:30:13 +0000 (UTC) Subject: [Issue 4899] Ddoc: Warnings about stray parens do not include file and line numbers for module comments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4899 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ddoc, pull Platform|Other |All OS/Version|Linux |All --- Comment #5 from Kenji Hara 2013-07-01 18:30:07 PDT --- https://github.com/D-Programming-Language/dmd/pull/2291 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 19:04:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 02:04:08 +0000 (UTC) Subject: [Issue 10462] interface thunk doesn't preserve EBX In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10462 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-01 19:03:54 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c331f2021404ecc75e8e62bd4d46b92de573008c fix Issue 10462 - interface thunk doesn't preserve EBX https://github.com/D-Programming-Language/dmd/commit/51efce6654e35a3ccb737fd7146acfda7dbf1210 Merge pull request #2278 from WalterBright/fix10462 fix Issue 10462 - interface thunk doesn't preserve EBX -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 1 21:36:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 04:36:49 +0000 (UTC) Subject: [Issue 10462] interface thunk doesn't preserve EBX In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10462 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-01 21:36:47 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ed1174fb43c6abc3baa94c80c711227fc7ab6830 Merge pull request #2278 from WalterBright/fix10462 fix Issue 10462 - interface thunk doesn't preserve EBX -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 00:29:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 07:29:43 +0000 (UTC) Subject: [Issue 10491] Type inference for function arguments with default value In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10491 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #5 from bearophile_hugs at eml.cc 2013-07-02 00:29:40 PDT --- OK, closed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 00:33:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 07:33:40 +0000 (UTC) Subject: [Issue 7227] [] syntax for empty associative array too? In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7227 --- Comment #5 from bearophile_hugs at eml.cc 2013-07-02 00:33:38 PDT --- (In reply to comment #3) > This patch has chosen the [] syntax over the [:] syntax. But I prefer the [:] syntax, because it's more precise. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 00:44:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 07:44:00 +0000 (UTC) Subject: [Issue 10475] destructor is called on 'for' loop variable even when initialization failed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10475 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-02 00:43:41 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6c7d77f690f509255950321e3e0fec9f29d02df6 fix Issue 10475 - destructor is called on 'for' loop variable even when initialization failed https://github.com/D-Programming-Language/dmd/commit/aaf64112624abab1f6cc8f610223f6e12b525e09 Merge pull request #2286 from 9rnsr/fix10475 Issue 10475 - destructor is called on 'for' loop variable even when initialization failed -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 00:46:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 07:46:40 +0000 (UTC) Subject: [Issue 7227] [] syntax for empty associative array too? In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7227 --- Comment #6 from bearophile_hugs at eml.cc 2013-07-02 00:46:28 PDT --- Having two obvious syntaxes to do the same thing is not so good. So I suggest to also introduce a warning for the usage of "null" as associative array literal: void foo(int[int]) {} void main() { foo(null); int[int][] aas = [null]; aas[0] = [1: 2, 2: 3]; } => test.d(3): Warning: explicit [:] empty associative array literal is better than null, that will be deprecated test.d(4): Warning: explicit [:] empty associative array literal is better than null, that will be deprecated (The wording of such warning message is modelled on another warning message: test.d(3): Warning: explicit element-wise assignment (a)[] = 2 is better than a = 2) (This warning is not meant to be kept. Later this warning is meant to become a deprecation, and later an error). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 01:01:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 08:01:59 +0000 (UTC) Subject: [Issue 10320] Warning for old-style operator overloading methods definition In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10320 --- Comment #1 from bearophile_hugs at eml.cc 2013-07-02 01:01:58 PDT --- Cases like in this thread show that it's important to give a warning now: http://forum.dlang.org/thread/hwfzaysrfxiiumppxwkt at forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 02:01:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 09:01:39 +0000 (UTC) Subject: [Issue 5207] Immutability is broken in constructors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5207 --- Comment #3 from Lars T. Kyllingstad 2013-07-02 02:01:08 PDT --- I'm not suggesting that the assignment be prohibited. Rather, I think it should be illegal to *access* the variable before it is initialised. If the current behaviour is by design, consider this an enhancement request. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 02:06:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 09:06:33 +0000 (UTC) Subject: [Issue 10525] New: Struct as key in Associative array ignores value semantics Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10525 Summary: Struct as key in Associative array ignores value semantics Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: michal.minich at gmail.com --- Comment #0 from Michal Minich 2013-07-02 02:06:31 PDT --- DMD 2.063.2 struct S { char[] str; } void main () { auto s1 = S(cast(char[])"abc"); auto s2 = S(cast(char[])"Xbc"); // indirect members in structs are compared by value assert (s1 != s2); // ok, structs are compared not equal s2.str[0] = 'a'; assert (s1 == s2); // ok, structs are compared equal // not so in AA auto aa = [s1 : 1]; auto s1aa = s1 in aa; assert (s1aa); auto s2aa = s2 in aa; assert (s2aa); // fails, but should pass // s2 should be found in aa the same way as s1 } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 04:27:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 11:27:29 +0000 (UTC) Subject: [Issue 9857] UFCS for struct opCall In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9857 --- Comment #14 from bearophile_hugs at eml.cc 2013-07-02 04:27:25 PDT --- For potential downsides see also: http://forum.dlang.org/thread/sdffgyosxmfjjjrshajy at forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 04:51:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 11:51:44 +0000 (UTC) Subject: [Issue 10320] Warning for old-style operator overloading methods definition In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10320 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com See Also| |http://d.puremagic.com/issu | |es/show_bug.cgi?id=9257 --- Comment #2 from monarchdodra at gmail.com 2013-07-02 04:51:42 PDT --- (In reply to comment #1) > Cases like in this thread show that it's important to give a warning now: > > http://forum.dlang.org/thread/hwfzaysrfxiiumppxwkt at forum.dlang.org Related (but not duplicate) is also Issue 9257 - [ER] New optional "operator" keyword to validate magic functions http://d.puremagic.com/issues/show_bug.cgi?id=9257 And associated discussion: http://forum.dlang.org/thread/iubdngjksicwxugrqesc at forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 05:10:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 12:10:38 +0000 (UTC) Subject: [Issue 4899] Ddoc: Warnings about stray parens do not include file and line numbers for module comments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4899 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-02 05:10:36 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/328969f671c9fcdc2fb7b9ba7ae65e483074961d fix Issue 4899 - Ddoc: Warnings about stray parens do not include file and line numbers for module comments Add ModuleDeclaration::loc and use it for "Stray paren" ddoc warning. https://github.com/D-Programming-Language/dmd/commit/23c3c6add8162693f85b3b41c9bf6550a71a57d3 Merge pull request #2291 from 9rnsr/fix4899 Issue 4899 - Ddoc: Warnings about stray parens do not include file and line numbers for module comments -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 05:10:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 12:10:57 +0000 (UTC) Subject: [Issue 4899] Ddoc: Warnings about stray parens do not include file and line numbers for module comments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4899 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 07:05:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 14:05:17 +0000 (UTC) Subject: [Issue 8563] Exception segfault In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8563 --- Comment #6 from Kenji Hara 2013-07-02 07:05:14 PDT --- I posted bug 10475 fix and now it's merged in git head. Could you please confirm the actual case by using git head? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 07:25:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 14:25:07 +0000 (UTC) Subject: [Issue 10482] Regression (2.063): Compiler doesn't warn about prefix const In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10482 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|regression |enhancement --- Comment #7 from Kenji Hara 2013-07-02 07:25:01 PDT --- This is an intended change comes from issue 10150, so is not a regression. Today dmd never distinguishes prefix storage class and scopes/labeled ones. That's a design decision which sometimes talked by Walter. But also, I can agree that it is a little bug-prone behavior. So I switch this into enhancement issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 08:07:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 15:07:12 +0000 (UTC) Subject: [Issue 10254] Purity correctness is broken with constructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10254 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-02 08:07:10 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6e6310d20dfa75c1d56b33be66056e9554092e0c fix Issue 10254 - Purity correctness is broken with constructor https://github.com/D-Programming-Language/dmd/commit/64e05bb8862c1cd33d61900957dc128d1c8d4712 Merge pull request #2135 from 9rnsr/fix10254 Issue 10254 - Purity correctness is broken with constructor -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 08:39:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 15:39:36 +0000 (UTC) Subject: [Issue 10254] Purity correctness is broken with constructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10254 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 08:43:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 15:43:43 +0000 (UTC) Subject: [Issue 10482] Regression (2.063): Compiler doesn't warn about prefix const In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10482 --- Comment #8 from Dicebot 2013-07-02 08:43:42 PDT --- (In reply to comment #7) > This is an intended change comes from issue 10150, so is not a regression. > > Today dmd never distinguishes prefix storage class and scopes/labeled ones. > That's a design decision which sometimes talked by Walter. > > But also, I can agree that it is a little bug-prone behavior. > So I switch this into enhancement issue. Yep, it is not a regression but a breaking change introduces by 10150, which should not have been implemented in the first place. I wish I have noticed that pull request before it was merged. There is currently minor discussion on topic in 10150 thread. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 09:25:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 16:25:33 +0000 (UTC) Subject: [Issue 6646] [SafeD] array.reserve is not @safe/trusted In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6646 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-02 09:25:32 PDT --- https://github.com/D-Programming-Language/druntime/pull/536 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 09:35:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 16:35:05 +0000 (UTC) Subject: [Issue 6651] [SafeD] Exception/Throwable constructors are not @safe ? In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6651 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |hsteoh at quickfur.ath.cx Resolution| |WORKSFORME --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-02 09:35:05 PDT --- This bug seems no longer present in git HEAD. Please reopen if there's still a problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 09:38:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 16:38:18 +0000 (UTC) Subject: [Issue 7051] Class member with un-@safe destructor gives confusing error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7051 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #4 from hsteoh at quickfur.ath.cx 2013-07-02 09:38:17 PDT --- The error message has improved in git HEAD: /tmp/test.d(6): Error: safe function 'test.Bar.~this' cannot call system function 'test.Foo.~this' Should this issue be resolved? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 09:39:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 16:39:37 +0000 (UTC) Subject: [Issue 7051] Class member with un-@safe destructor gives confusing error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7051 David Nadlinger changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 10:00:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 17:00:45 +0000 (UTC) Subject: [Issue 7863] randomShuffle doesn't work with a Xorshift In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7863 Joseph Rushton Wakeling changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.wakeling at webdrake.ne | |t --- Comment #1 from Joseph Rushton Wakeling 2013-07-02 10:00:43 PDT --- Cf. my response to Issue #9607 -- there's a pull request under review that should fix this: http://d.puremagic.com/issues/show_bug.cgi?id=9607 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 10:12:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 17:12:26 +0000 (UTC) Subject: [Issue 8563] Exception segfault In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8563 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #7 from Maxim Fomin 2013-07-02 10:12:24 PDT --- (In reply to comment #6) > I posted bug 10475 fix and now it's merged in git head. > Could you please confirm the actual case by using git head? This issue is also fixed. Thank you. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 12:28:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 19:28:41 +0000 (UTC) Subject: [Issue 6646] [SafeD] array.reserve is not @safe/trusted In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6646 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-02 12:28:37 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/032bac64ef3e354da65da38314c51af09eebcf05 Fix issue 6646: array.reserve should be callable from SafeD. https://github.com/D-Programming-Language/druntime/commit/fa85c1b413cbe81416f02995cfefe6107a4cbb4e Merge pull request #536 from quickfur/issue6646 Fix issue 6646: array.reserve should be callable from SafeD. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 12:29:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 19:29:33 +0000 (UTC) Subject: [Issue 6646] [SafeD] array.reserve is not @safe/trusted In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6646 Alex R?nne Petersen changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |alex at lycus.org Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 13:04:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 20:04:51 +0000 (UTC) Subject: [Issue 10491] Type inference for function arguments with default value In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10491 --- Comment #6 from Henning Pohl 2013-07-02 13:04:46 PDT --- (In reply to comment #4) > (In reply to comment #1) > > https://github.com/D-Programming-Language/dmd/pull/2270 > > I think a decision should be taken. What do you think about this issue Henning > Pohl? Can only three people actually take decisions like that? Let me comment on Kenji's four points: 1. True, but these little syntactic improvements make writing D more fun as a whole. 2. This is what D should do more often. 3. The cost of inferring things. If the quality of the error messages are appropriate, it is totally worth it. 4. In which way do "in ref" and "auto ref" conflict with this? Walter has underlined multiple times the importance of beautiful code. And that is the goal of this enhancement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 14:00:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 2 Jul 2013 21:00:25 +0000 (UTC) Subject: [Issue 10491] Type inference for function arguments with default value In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10491 --- Comment #7 from bearophile_hugs at eml.cc 2013-07-02 14:00:23 PDT --- (In reply to comment #6) > Can only three people actually take decisions like that? I'd like Walter and/or Andrei to give a comment to this (and to your patch). I have asked here, in the main D newsgroup, and your patch was exposed in GitHub for several days. > 1. True, but these little syntactic improvements make writing D more fun as a > whole. Default arguments are not so common... > 3. The cost of inferring things. If the quality of the error messages are > appropriate, it is totally worth it. The point 3 by Hara is probably the most important. If he says this enhancement may cause more typing problems then we should listen to him. At minimum your patch should contain more tests. (But adding tests to a patch is receiving a cold interest risks being a further waste of time.) Thank you for your patch and your comments. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 19:08:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 02:08:50 +0000 (UTC) Subject: [Issue 10518] Static SIMD vector constants cannot be defined. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10518 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |henning at still-hidden.de Resolution| |DUPLICATE --- Comment #1 from Henning Pohl 2013-07-02 19:08:49 PDT --- *** This issue has been marked as a duplicate of issue 10312 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 19:08:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 02:08:51 +0000 (UTC) Subject: [Issue 10312] compiler assert failure with ctfe on simd vector type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10312 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Marco.Leise at gmx.de --- Comment #5 from Henning Pohl 2013-07-02 19:08:49 PDT --- *** Issue 10518 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: ------- From d-bugmail at puremagic.com Tue Jul 2 19:27:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 02:27:22 +0000 (UTC) Subject: [Issue 10526] New: opDispatch with IFTI should not disable UFCS Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10526 Summary: opDispatch with IFTI should not disable UFCS Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-02 19:27:17 PDT --- From: http://forum.dlang.org/post/cxgefmgjnzgoizrdtcbb at forum.dlang.org In following code, opDispatch call requires IFTI due to TemplateTupleParameter T deduction. However it unexpectedly disables UFCS. import std.conv, std.stdio, std.algorithm; struct S { void opDispatch(string s, T...)(T t) if (s.startsWith("foo")) { writeln(s); } } void main() { S s; s.foo(); // --> OK auto p = s.to!string(); // --> Error: s.opDispatch!("to") isn't a template } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 20:42:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 03:42:51 +0000 (UTC) Subject: [Issue 10526] opDispatch with IFTI should not disable UFCS In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10526 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-02 20:42:47 PDT --- https://github.com/D-Programming-Language/dmd/pull/2292 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 20:55:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 03:55:58 +0000 (UTC) Subject: [Issue 10517] readln(Char)(Char[] buf) accepts non-mutable buffers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10517 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-02 20:55:54 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/97cec336a14c5d433970b930906bfeb68fdccaf3 Fix Issue 10517 - readln(Char)(Char[] buf) accepts non-mutable buffers Also templatizes a global readln https://github.com/D-Programming-Language/phobos/commit/3be7a03168c8763a4fef9d62210899d8a9be518c Merge pull request #1381 from monarchdodra/readln Fix Issue 10517 - readln(Char)(Char[] buf) accepts non-mutable buffers -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 2 21:00:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 04:00:32 +0000 (UTC) Subject: [Issue 10517] readln(Char)(Char[] buf) accepts non-mutable buffers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10517 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 03:51:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 10:51:22 +0000 (UTC) Subject: [Issue 10527] New: Eliding more postblit constructor calls Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10527 Summary: Eliding more postblit constructor calls Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: tommitissari at hotmail.com --- Comment #0 from Tommi 2013-07-03 03:51:18 PDT --- Definitions: 1) 'Str' is a struct type which has a postblit constructor 2) 'var' is a variable whose unqualified type is Str 3) 'cpy' is a copy of the variable var Proposed language change: Whenever a copy is made from var to cpy (either by making a new variable or by passing var to a function by value) and the compiler can determine (either through analysing code or by deduction from a function signature) that during the lifetime of cpy, no mutation is done to var nor to any data reachable from it, the language should guarantee these two things: 1) cpy's postblit constructor is omitted when cpy is constructed 2) cpy's destructor is omitted when cpy goes out of scope Examples: Here are some examples, where the compiler can deduce that it's safe to omit the postblit and destructor of cpy by merely looking at the function signature: 1) int foo(T, U)(const Str cpy, const T t, immutable U u) pure { } 2) void foo(T, U)(immutable Str cpy, T t, U u) { } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 04:12:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 11:12:00 +0000 (UTC) Subject: [Issue 10527] Eliding more postblit constructor calls In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10527 --- Comment #1 from Tommi 2013-07-03 04:12:00 PDT --- (In reply to comment #0) > [..] the language should guarantee these two things: > 1) cpy's postblit constructor is omitted when cpy is constructed > 2) cpy's destructor is omitted when cpy goes out of scope Let's change this proposal so that the language would guarantee to do those optimisations only when it can deduce that it can be done from looking at function signatures. And the compiler can choose whether or not it wants to try to do more postblit/destructor elisions through static analysis. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 06:55:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 13:55:57 +0000 (UTC) Subject: [Issue 10527] Eliding more postblit constructor calls In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10527 --- Comment #2 from Tommi 2013-07-03 06:55:55 PDT --- (In reply to comment #0) > 2) 'var' is a variable whose unqualified type is Str By this I mean: is(std.traits.Unqual!(typeof(var)) == Str) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 07:33:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 14:33:40 +0000 (UTC) Subject: [Issue 10463] dirEntries() segfaults on paths the user does not have access to In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10463 Nils changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from Nils 2013-07-03 07:33:37 PDT --- Issue 8563 is fixed. The test case of this issue now throws a nice "Permission denied" exception. Closing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 08:21:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 15:21:37 +0000 (UTC) Subject: [Issue 10528] New: Private constant (enum) properties not private Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10528 Summary: Private constant (enum) properties not private Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: anoneuron at gmail.com --- Comment #0 from anoneuron at gmail.com 2013-07-03 08:21:34 PDT --- Manifest constants don't seem to honour the 'private' attribute when inside aggregate type definitions. Here's an example: /* --- module1.d --- */ private enum string ModuleData = "asdfgh"; struct Structure { static private enum string Data = "qwerty"; }; /* --- module2.d --- */ import module1; import std.stdio; void main() { writeln(ModuleData); // Error: mod1.ModuleData is private (correct) writeln(Structure.Data); // no error (incorrect) }; I can't find any reason why this might be permitted, so it seems like a bug to me. Tested using DMD v2.063.2 on WinXP. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 09:05:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 16:05:20 +0000 (UTC) Subject: [Issue 9857] UFCS for struct opCall In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9857 timon.gehr at gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.gehr at gmx.ch --- Comment #15 from timon.gehr at gmx.ch 2013-07-03 09:05:16 PDT --- The discussion is misguided. opCall is compatible with UFCS already. I suggest to close this down and to open a more detailed enhancement request for using local symbols with UFCS instead if that is desired. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 09:22:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 16:22:37 +0000 (UTC) Subject: [Issue 10529] New: rmdirRecurse should have an optional force parameter for read-only file removal Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10529 Summary: rmdirRecurse should have an optional force parameter for read-only file removal Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-03 09:22:37 PDT --- On win32 rmdirRecurse will fail if a file in the directory has the read-only attribute set. The win32 API says such a file needs to have its read-only attribute removed, however Phobos lacks a 'setFileAttributes' function. I propose we add an optional 'force' enum or boolean to rmdirRecurse, which will force removal of read-only files by removing the read-only attribute. This probably means other related functions like 'remove' will need to have this optional parameter. Additionally we should provide a setAttributes function -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 09:42:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 16:42:19 +0000 (UTC) Subject: [Issue 9857] UFCS for struct opCall In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9857 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #16 from bearophile_hugs at eml.cc 2013-07-03 09:42:17 PDT --- (In reply to comment #15) > The discussion is misguided. opCall is compatible with UFCS already. Right, I didn't realize this works: struct Foo { int opCall(bool b) { return 0; } } Foo foo; void main() { auto b1 = foo(true); // OK auto b2 = true.foo; // Error } > I suggest to close this down OK, closed. > and to open a more detailed enhancement request for using > local symbols with UFCS instead if that is desired. That's a quite different need. It needs more thinking. Thank you for the note. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 09:48:02 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 16:48:02 +0000 (UTC) Subject: [Issue 10530] New: Initializers inside named enum declarations cannot forward reference other members Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10530 Summary: Initializers inside named enum declarations cannot forward reference other members Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: timon.gehr at gmx.ch --- Comment #0 from timon.gehr at gmx.ch 2013-07-03 09:48:00 PDT --- DMD 2.063/git head: enum X {foo=0, bar=foo} // ok enum Y {foo=bar, bar=0} // error Both lines should compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 09:57:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 16:57:21 +0000 (UTC) Subject: [Issue 7227] [:] as empty associative array literal, plus warning for null In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7227 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[:] as empty associative |[:] as empty associative |array literal |array literal, plus warning | |for null --- Comment #7 from bearophile_hugs at eml.cc 2013-07-03 09:57:18 PDT --- I have opened a discussion here: http://forum.dlang.org/thread/rkdzdxygpflpnaznxxnl at forum.dlang.org In the discussion I have explained better why I think [:] is better than []. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 10:17:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 17:17:40 +0000 (UTC) Subject: [Issue 953] Multiple C style declarations of same type cannot be in one statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=953 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #7 from bearophile_hugs at eml.cc 2013-07-03 10:17:37 PDT --- So this code has different meanings in C and D: void main() { int *a, b; } And to keep the D language simple this is disallowed: int a[8], c[8]; Then what is this issue asking for? In Issue 5807 I have suggested to disallow mixing C and D style of array in a single declaration: // array of 5 dynamic arrays of ints. int[][5] c; int[] c[5]; int c[5][]; Also because of some problems it causes with vector ops syntax: void main() { int[] a1 = [1, 2, 3]; int[] a2 = new int[3]; a2[] = a1[]; // OK int[3] a3[] = a2[]; // line 5, Error } Beside disallowing the mix of C and D syntaxes in a single declaration, another thing that may be good to do is to perpetually deprecate the C syntax (and do not turn it into an error). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 10:34:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 17:34:48 +0000 (UTC) Subject: [Issue 10531] New: Enum base type not inferred from initializer of first member Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10531 Summary: Enum base type not inferred from initializer of first member Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: timon.gehr at gmx.ch --- Comment #0 from timon.gehr at gmx.ch 2013-07-03 10:34:47 PDT --- http://dlang.org/enum.html states: If the EnumBaseType is not explicitly set, and the first EnumMember has an initializer, it is set to the type of that initializer. Otherwise, it defaults to type int. However: enum E{x=""} Error: cannot implicitly convert expression ("") of type string to int -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 10:43:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 17:43:07 +0000 (UTC) Subject: [Issue 10531] Enum base type not inferred from initializer of first member In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10531 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich at gmail.com Resolution| |DUPLICATE --- Comment #1 from Andrej Mitrovic 2013-07-03 10:43:05 PDT --- This was fixed in git-head recently. *** This issue has been marked as a duplicate of issue 3096 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 10:43:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 17:43:09 +0000 (UTC) Subject: [Issue 3096] EnumBaseType In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=3096 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.gehr at gmx.ch --- Comment #4 from Andrej Mitrovic 2013-07-03 10:43:06 PDT --- *** Issue 10531 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: ------- From d-bugmail at puremagic.com Wed Jul 3 11:19:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 18:19:36 +0000 (UTC) Subject: [Issue 5788] Return [] array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5788 --- Comment #3 from bearophile_hugs at eml.cc 2013-07-03 11:19:34 PDT --- currently this code: void main() { int[] emptyArray = []; } Produces: __Dmain comdat L0: push EAX mov EAX,offset FLAT:_D11TypeInfo_Ai6__initZ push 0 push EAX call near ptr __d_arrayliteralTX add ESP,8 xor EAX,EAX pop ECX ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 13:24:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 20:24:08 +0000 (UTC) Subject: [Issue 10530] Initializers inside named enum declarations cannot forward reference other members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10530 --- Comment #1 from timon.gehr at gmx.ch 2013-07-03 13:24:07 PDT --- Actually it might be fine for the second line to be in error, since the compiler cannot easily figure out the enum base type in the general case when such a constellation is present. This should certainly work though: enum Y : int {foo=bar, bar=0} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 13:46:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 3 Jul 2013 20:46:51 +0000 (UTC) Subject: [Issue 10530] Initializers inside named enum declarations cannot forward reference other members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10530 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #2 from Andrej Mitrovic 2013-07-03 13:46:36 PDT --- However this shouldn't work: enum Y : int {foo=bar, bar} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 18:34:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 01:34:27 +0000 (UTC) Subject: [Issue 10532] New: Silence some unreachable statement warnings when in a static foreach Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10532 Summary: Silence some unreachable statement warnings when in a static foreach Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-03 18:34:26 PDT --- ----- import std.traits; enum E { a, b} void main() { foreach (e; EnumMembers!E) { if (e == E.a) continue; // lots of code follows.. auto x = 1; } } ----- $ dmd -w test.d > test.d(14): Warning: statement is not reachable I don't know if this is doable, but it's a little annoying that we have these unreachable statement warnings when in a static foreach loop. It forces use to use an else statement, but this introduces indentation. In this specific test-case the alternative could be to Filter!() through the EnumMembers so "E.a" never appears in the loop, but for more complex cases such filtering may not be usable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 18:59:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 01:59:29 +0000 (UTC) Subject: [Issue 10533] New: Bad diagnostic when template has alias overloads Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10533 Summary: Bad diagnostic when template has alias overloads Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-03 18:59:28 PDT --- ----- struct S1 { T get(T)() if (is(T == float)) { } } struct S2 { auto get(alias value)() { return S1.get!(typeof(value)); } } struct S3 { auto get(alias value)() { return get!(typeof(value)); } T get(T)() if (is(T == float)) { return T.init; } } void main() { // Error: template instance get!int does not match template declaration get(T)() if (is(T == float)) S1.get!int; // Error: template instance get!int does not match template declaration get(T)() if (is(T == float)) S2.get!1; // Error: cannot resolve type for this.get!int S3.get!1; } ----- Observations: S2.get calls into S1.get, and creates a nice error message. However in S3 the get templates are overloaded against each other, and this causes the diagnostic to become bad. S3.get should have the same diagnostic as S2.get. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 19:01:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 02:01:40 +0000 (UTC) Subject: [Issue 10534] New: Addition and subtraction of delegates allowed Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10534 Summary: Addition and subtraction of delegates allowed Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: callumenator at gmail.com --- Comment #0 from callumenator at gmail.com 2013-07-03 19:01:39 PDT --- DMD 2.063 void main() { int delegate() a = ()=>5; int delegate() b = ()=>5; auto c1 = a+b; // passes (and will crash if c1() called) auto c2 = a-b; // passes (and will crash if c2() called) auto c3 = a/b; // a & b not of arithmetic type auto c4 = a*b; // a & b not of arithmetic type } DMD properly rejects all arithmetic if delegates are typed as int function()'s. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 20:47:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 03:47:18 +0000 (UTC) Subject: [Issue 10534] Addition and subtraction of delegates allowed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10534 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-03 20:47:05 PDT --- https://github.com/D-Programming-Language/dmd/pull/2294 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 22:18:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 05:18:32 +0000 (UTC) Subject: [Issue 10535] New: Add a function to druntime which returns an empty AA Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10535 Summary: Add a function to druntime which returns an empty AA Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: jmdavisProg at gmx.com --- Comment #0 from Jonathan M Davis 2013-07-03 22:18:30 PDT --- Right now, the only way to get an empty AA (as opposed to a null one) is to add an element to it and then remove it, which is neither user-friendly, nor efficient. It would be easy enough to create a function which at least wrapped all that (creating the AA, adding the element, and then removing it), but it would be more efficient if the AA implementation did it, since it should be able to do it without having to add or remove an element. It would also be possible for the AA implementation to do it without using the init property (as adding and then removing an element would likely require the init property in order to get an element to add). So, this enhancement request is for adding a function to druntime which returns an empty AA without actually adding or removing elements from the AA to do it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 3 22:40:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 05:40:24 +0000 (UTC) Subject: [Issue 10535] Add a function to druntime which returns an empty AA In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10535 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #1 from monarchdodra at gmail.com 2013-07-03 22:40:22 PDT --- Not to hijack this, but before we add that AA specific function, we should take into account that a LOT of other objects require this. Basically, every reference semantic object in Phobos: Containers, Appender, PRNGs... There might be a better "generic" solution to the "empty initialization" (eg: "arg-less-constructor") problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 00:47:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 07:47:35 +0000 (UTC) Subject: [Issue 10536] New: std.typecons.wrap doesn't work with a class that defines opCast Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10536 Summary: std.typecons.wrap doesn't work with a class that defines opCast Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-04 00:47:34 PDT --- std.typecons.wrap and unwrap internally uses cross-cast, but current implementation accidentally takes opCast member functions. Code: ---- import std.typecons; interface Interface { int foo(); } class Pluggable { int foo() { return 1; } @disable void opCast(T, this X)(); // ! } void main() { Interface i = new Pluggable().wrap!Interface; assert(i.foo() == 1); } Output: ---- std\typecons.d(2780): Error: function test.Pluggable.opCast!(inout(Object), inout(Pluggable)).opCast is not callable because it is annotated with @disable std\typecons.d(2780): Error: pure function 'std.typecons.wrap!(Interface).wrap!(Pluggable).Impl._wrap_getSource' cannot call impure function 'test.Pluggable.opCast!(inout(Object), inout(Pluggable)).opCast' std\typecons.d(2780): Error: cannot implicitly convert expression (this._wrap_source.opCast()) of type void to inout(Object) test.d(16): Error: template instance std.typecons.wrap!(Interface).wrap!(Pluggable) error instantiating ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 00:48:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 07:48:37 +0000 (UTC) Subject: [Issue 10537] New: Forward reference error on 'yield' toy example. Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10537 Summary: Forward reference error on 'yield' toy example. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: timon.gehr at gmx.ch --- Comment #0 from timon.gehr at gmx.ch 2013-07-04 00:48:36 PDT --- Compiled and ran with DMD 2.060, does not compile anymore with DMD 2.063: http://dpaste.dzfl.pl/baa538af -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 00:51:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 07:51:57 +0000 (UTC) Subject: [Issue 10538] New: std.typecons.wrap should consider opDispatch Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10538 Summary: std.typecons.wrap should consider opDispatch Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-04 00:51:56 PDT --- This code currently doesn't work, but it should. import std.typecons; interface Interface { int foo(); int bar(int); } class Pluggable { int opDispatch(string name, A...)(A args) { return 100; } } void main() { Interface i = wrap!Interface(new Pluggable()); assert(i.foo() == 100); assert(i.bar(10) == 100); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:10:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:10:19 +0000 (UTC) Subject: [Issue 10536] std.typecons.wrap doesn't work with a class that defines opCast In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10536 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-04 01:10:18 PDT --- https://github.com/D-Programming-Language/phobos/pull/1386 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:10:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:10:24 +0000 (UTC) Subject: [Issue 10538] std.typecons.wrap should consider opDispatch In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10538 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-04 01:10:23 PDT --- https://github.com/D-Programming-Language/phobos/pull/1386 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:14:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:14:16 +0000 (UTC) Subject: [Issue 10243] [CTFE] Wrong-code on passing dereferenced array pointer by ref In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10243 --- Comment #3 from Don 2013-07-04 01:14:14 PDT --- The original test case in this bug report works for me now, and your comment "// now works" indicates that it is fixed for you as well? The code in comment 2 is a different bug. Although the effects look very similar, it is actually independent of the original one. The bug lies in a different part of the code. Generally, you should create a new bug report rather than reopening a bug, if the test case in the original bug report has been fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:23:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:23:32 +0000 (UTC) Subject: [Issue 10266] CTFE: Allow reinterpret casts T <-> T[1] In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10266 --- Comment #3 from Don 2013-07-04 01:23:30 PDT --- (In reply to comment #2) > (In reply to comment #1) > > I suspect that after the cast, it might not be a genuine array. > > I like the idea to not create genuine array here. Just a restricted array for > e.g. `foreach`. Hmmm, I don't know how to do that. This kind of feature is practically guaranteed to fail, it creates dozens of weird special cases (and they would all be subtle wrong-code bugs). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:37:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:37:17 +0000 (UTC) Subject: [Issue 10314] Add std.traits.signed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10314 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-04 01:37:13 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/378fe783523259849beebcc7553c0a9654d0c4f9 Implement issue# 10314. This moves std.traits.unsigned to std.conv and adds std.conv.signed, since for some reason, we have std.traits.unsigned but do not have std.traits.signed. https://github.com/D-Programming-Language/phobos/commit/1b230c39c516e762a18a3a88748c52d4bfdc907a Merge pull request #1341 from jmdavis/signed Implement issue# 10314 (add std.traits.signed). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:38:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:38:05 +0000 (UTC) Subject: [Issue 10314] Add std.traits.signed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10314 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:39:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:39:37 +0000 (UTC) Subject: [Issue 10539] New: [REG][2.063] Implicit pointer to array dereference for .ptr property fails Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10539 Summary: [REG][2.063] Implicit pointer to array dereference for .ptr property fails Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-04 01:39:36 PDT --- ----------------------- void main() { int[2][2] a; int* p1 = a.ptr.ptr; //error int* p2 = (*a.ptr).ptr; //OK } ----------------------- 2.063 and 2.063.2 produce: Error: cannot resolve type for &(*& a)[0] This used to work up to 2.062. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 01:56:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 08:56:44 +0000 (UTC) Subject: [Issue 10528] Private constant (enum) properties not private In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10528 --- Comment #1 from Adrien Pensart 2013-07-04 01:56:36 PDT --- Created an attachment (id=1228) Testcase for visibility attribute bug A simpler testcase, visibility attribute is completely broken, it could cause big troubles... tested on 2.063 on Windows XP, could someone test on other platforms ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 02:09:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 09:09:59 +0000 (UTC) Subject: [Issue 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10539 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Version|unspecified |D2 --- Comment #1 from Kenji Hara 2013-07-04 02:09:56 PDT --- https://github.com/D-Programming-Language/dmd/pull/2296 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 02:15:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 09:15:48 +0000 (UTC) Subject: [Issue 10540] New: variable used before set for empty static arrays, with -inline -O Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10540 Summary: variable used before set for empty static arrays, with -inline -O Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-04 02:15:47 PDT --- Thread: http://forum.dlang.org/thread/khdhvzfdfljbtlyfqocw at forum.dlang.org#post-khdhvzfdfljbtlyfqocw:40forum.dlang.org When compiled with -O -inline: -------- struct S { int[0] a; void do_it() { foo(a); } } void foo(Args...)(Args args) { //foreach(arg; args) // if (arg.ptr == null) // return; bar(args); } void bar(Args...)(Args args) { foreach(arg; args) if (arg.ptr == null) return; } void main() {} -------- Produces: main.d(11): Error: variable _param_0 used before set -------- Possibly the compiler optimizes out a's initialization, since it is an empty static array. Code is glitchy: Not only does the bug appear only in bar (and not foo), un-commenting the code in foo will *fix* the call in bar... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 02:16:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 09:16:30 +0000 (UTC) Subject: [Issue 10540] variable used before set for empty static arrays, with -inline -O In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10540 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http://forum.dlang.org/thre | |ad/khdhvzfdfljbtlyfqocw at for | |um.dlang.org See Also| |http://d.puremagic.com/issu | |es/show_bug.cgi?id=7953 --- Comment #1 from monarchdodra at gmail.com 2013-07-04 02:16:29 PDT --- Possibly related: http://d.puremagic.com/issues/show_bug.cgi?id=7953 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 03:03:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 10:03:55 +0000 (UTC) Subject: [Issue 3646] Default values of function arguments are ignored when instantiating a template. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=3646 --- Comment #12 from github-bugzilla at puremagic.com 2013-07-04 03:03:45 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/877e7bfd7c29fb016323934bb04bd3420bffe5c7 Default args and arg identifiers are now volatile information in TypeFunction. 1. The extra informations would be kept after semantic analysis for function pointer and delegate types. But merging type would strip all the extras from the type structure, then cache the stripped copy into. 2. The types has extra informations cannot be named. In other words, AliasDeclaration would always strip the aliased type. This rule also works for Template Type Parameter, and fixes issue 3646 well. 3. CondExp would strip them from the type of its result. https://github.com/D-Programming-Language/dmd/commit/bce2d07d6cd2c09a5153afc65260b63c32447ade fix Issue 3646 - Default values of function arguments are ignored when instantiating a template. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 03:04:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 10:04:15 +0000 (UTC) Subject: [Issue 3866] anonymous delegate with default parameters cross-talks to another anonymous delegate In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=3866 --- Comment #14 from github-bugzilla at puremagic.com 2013-07-04 03:04:04 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d7362898f16d7d5e04ac4e9f374a39a5e8e0ff53 Improved fix for Issue 3866 - anonymous delegate with default parameters cross-talks to another anonymous delegate This reverts commit acc22ce25db42facfe4917aeceabd28a410f4c95, and moves original test into runnable/functype.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 03:09:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 10:09:17 +0000 (UTC) Subject: [Issue 10541] New: Failure writing to elements of std.range.zip Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10541 Summary: Failure writing to elements of std.range.zip Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: joseph.wakeling at webdrake.net --- Comment #0 from Joseph Rushton Wakeling 2013-07-04 03:09:15 PDT --- According to the documentation, std.range.zip "offers mutation and swapping if all ranges offer it". However, as the attached code sample shows, attempting to write to elements of a zip in a foreach loop consistently fail, even when accessed by ref and when all ranges in the zip are mutable. The sample code shows (i) foreach'ing over a lockstep of a non-mutable range and an array, writing to the array; (ii) foreach'ing over a zip of a non-mutable range and an array; (iii) foreach'ing over a zip of two arrays, writing to the second, with only the elements of the second accessed via ref; (iv) foreach'ing over a zip of two arrays, accessing the elements of both via ref. The foreach over the lockstep results in an array with correctly-written values, but the arrays that should be written to via foreach over zip remain full of nan's. This problem is also a block to the proposal in #8155 to deprecate lockstep in favour of zip, since it makes it impossible to do a blanket replace 's/lockstep/zip/' and have the resulting code work. At a minimum, zip should be corrected to ensure that its elements are mutable in line with the statement made in the docs (i.e., the 3rd and 4th cases in the sample code should result in arrays filled with correct values). Ideally, elements of a zip that come from a mutable range should themselves be mutable even if the other ranges in the zip aren't (i.e. the 2nd case in the sample code should also work). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 03:09:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 10:09:56 +0000 (UTC) Subject: [Issue 10541] Failure writing to elements of std.range.zip In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10541 --- Comment #1 from Joseph Rushton Wakeling 2013-07-04 03:09:54 PDT --- Created an attachment (id=1229) Sample code to illustrate the problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 03:10:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 10:10:58 +0000 (UTC) Subject: [Issue 8155] Deprecate std.range.lockstep In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8155 --- Comment #17 from Joseph Rushton Wakeling 2013-07-04 03:10:53 PDT --- (In reply to comment #16) > If not already present I suggest you to open an enhancement request that asks > for your improvement of zip, and then we'll make this issue dependant to the > other one. They are two separate issues. Done: Issue #10541. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 03:11:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 10:11:36 +0000 (UTC) Subject: [Issue 10528] Private constant (enum) properties not private In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10528 Adrien Pensart changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crunchengine at gmail.com Severity|normal |major -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 04:42:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 11:42:57 +0000 (UTC) Subject: [Issue 10528] Private constant (enum) properties not private In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10528 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henning at still-hidden.de Severity|major |normal --- Comment #2 from Henning Pohl 2013-07-04 04:42:55 PDT --- (In reply to comment #1) > Created an attachment (id=1228) [details] > Testcase for visibility attribute bug > > A simpler testcase, visibility attribute is completely broken, it could cause > big troubles... > > tested on 2.063 on Windows XP, could someone test on other platforms ? In D "private" and "protected" symbols are also accessible in the module they are declared in. So your test case should compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 04:51:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 11:51:52 +0000 (UTC) Subject: [Issue 3646] Default values of function arguments are ignored when instantiating a template. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=3646 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Version|D1 & D2 |D2 Resolution| |FIXED --- Comment #13 from Kenji Hara 2013-07-04 04:51:50 PDT --- Right now, default argument is changed to not part of function type in D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 04:53:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 11:53:03 +0000 (UTC) Subject: [Issue 3866] anonymous delegate with default parameters cross-talks to another anonymous delegate In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=3866 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Version|D1 & D2 |D2 Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 04:53:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 11:53:26 +0000 (UTC) Subject: [Issue 8579] Default parameter appears a part of typeof().stringof of a function variable In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8579 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 04:54:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 11:54:28 +0000 (UTC) Subject: [Issue 8579] Default parameter appears a part of typeof().stringof of a function variable In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8579 --- Comment #4 from Kenji Hara 2013-07-04 04:54:26 PDT --- Fixed commit: https://github.com/D-Programming-Language/dmd/commit/a711eb6b499ca85b7cfa4e758d9e968fef8d315f -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 05:55:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 12:55:39 +0000 (UTC) Subject: [Issue 7780] Template mixin'd members do not properly overload In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7780 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #3 from Kenji Hara 2013-07-04 05:55:37 PDT --- (In reply to comment #0) [snip] > > foo.d(19): Error: __overloadset isn't a template > > Or (without the wrapping class): > > foo.d(17): Error: template instance C!(0) ambiguous template declaration > foo.B!().C(int n : 1) and foo.A!().C(int n : 0) > > The two versions of C here introduced could clearly coexist and be referred to > as Foo.C!0 and Foo.C!1. https://github.com/D-Programming-Language/dmd/pull/1660 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 07:16:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 14:16:47 +0000 (UTC) Subject: [Issue 9262] compilation of erroneous source files causes segfault in Package In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9262 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice Summary|compilation of erroneous |compilation of erroneous |source files causes |source files causes |segfault |segfault in Package --- Comment #2 from Don 2013-07-04 07:16:46 PDT --- This is crashing in Package::~Package(). I think this has already been fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 07:26:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 14:26:46 +0000 (UTC) Subject: [Issue 10542] New: implicitly generated class ctor doesnt inherit base class ctor attributes Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10542 Summary: implicitly generated class ctor doesnt inherit base class ctor attributes Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: henning at still-hidden.de --- Comment #0 from Henning Pohl 2013-07-04 07:26:45 PDT --- class B { this() nothrow pure @safe { } } class D : B { } void test() nothrow pure @safe { new M; } ---- main.d(12): Error: pure function 'main.test' cannot call impure function 'main.D.this' main.d(12): Error: safe function 'main.test' cannot call system function 'main.D.this' main.d(12): Error: constructor this is not nothrow main.d(10): Error: function 'main.test' is nothrow yet may throw ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 07:27:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 14:27:08 +0000 (UTC) Subject: [Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10542 --- Comment #1 from Henning Pohl 2013-07-04 07:27:07 PDT --- s/M/D -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 07:33:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 14:33:00 +0000 (UTC) Subject: [Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10542 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #2 from Henning Pohl 2013-07-04 07:32:59 PDT --- https://github.com/D-Programming-Language/dmd/pull/2297 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 07:36:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 14:36:21 +0000 (UTC) Subject: [Issue 7322] Taking address of deprecated functions isn't refused In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7322 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #9 from Kenji Hara 2013-07-04 07:36:18 PDT --- https://github.com/D-Programming-Language/dmd/pull/2130 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 09:30:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 16:30:33 +0000 (UTC) Subject: [Issue 10543] New: std.algorithm.map incorrectly uses source range length for narrow strings Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 Summary: std.algorithm.map incorrectly uses source range length for narrow strings Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: peter.alexander.au at gmail.com --- Comment #0 from Peter Alexander 2013-07-04 09:30:32 PDT --- void main() { import std.algorithm; import std.stdio; string s = "???????"; auto m = s.map!(a => 1); writeln(m, ", ", m.length); } Gives: [1, 1, 1, 1, 1, 1, 1], 21 Clearly the reported length (21) is wrong, it should be 7. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 09:31:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 16:31:55 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 --- Comment #1 from Peter Alexander 2013-07-04 09:31:54 PDT --- (In reply to comment #0) > Clearly the reported length (21) is wrong, it should be 7. Scratch that. length shouldn't be available at all for narrow strings as it is unobtainable in constant time. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 10:02:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 17:02:23 +0000 (UTC) Subject: [Issue 10544] New: writeln!(inout(int)) does not work Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10544 Summary: writeln!(inout(int)) does not work Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrei at erdani.com --- Comment #0 from Andrei Alexandrescu 2013-07-04 10:02:22 PDT --- Refer to http://stackoverflow.com/questions/17460065/how-to-print-inout-parameters for details. In all likelihood Unqual is the culprit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 10:10:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 17:10:12 +0000 (UTC) Subject: [Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10542 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-04 10:10:10 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6505a8d8affb22d4d6c9c2da465e26f1d5648016 fix issue 10542 - implicitly generated class ctor doesnt inherit base class ctor attributes https://github.com/D-Programming-Language/dmd/commit/9af380a868c5e63bcfa1dc7d2b184d9764b680e0 Merge pull request #2297 from hpohl/10542 fix issue 10542 - implicitly generated class ctor doesn't inherit base class ctor attributes -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 10:10:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 17:10:22 +0000 (UTC) Subject: [Issue 10542] implicitly generated class ctor doesnt inherit base class ctor attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10542 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 10:41:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 17:41:44 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #2 from bearophile_hugs at eml.cc 2013-07-04 10:41:41 PDT --- Where's the bug here? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 10:43:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 17:43:23 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 --- Comment #3 from Peter Alexander 2013-07-04 10:43:22 PDT --- (In reply to comment #2) > Where's the bug here? It says the length of [1, 1, 1, 1, 1, 1, 1] is 21. It isn't. It's 7. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 10:47:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 17:47:57 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 9999 changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mailnew4ster at gmail.com --- Comment #4 from 9999 2013-07-04 10:47:52 PDT --- 21 is the number of UTF-8 code units. Using dstring produces 7. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 10:54:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 17:54:47 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 --- Comment #5 from Peter Alexander 2013-07-04 10:54:42 PDT --- (In reply to comment #4) > 21 is the number of UTF-8 code units. > Using dstring produces 7. I am not requesting the length of the string, I am requesting the length of the map over the string. As ranges, strings are ranges of code points, not code units, so the number of elements in the *map* (confirmed by the output) is seven, i.e. that is the number of times you can safely call popFront on the map. I'm struggling to understand the confusion. m is a range of seven integers m.length is 21 walkLength(m) is also 21 This is completely broken. I fully understand that narrow strings use length to report code units, not code points, but m is not a string, so that distinction does not apply. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 12:57:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 19:57:13 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #6 from monarchdodra at gmail.com 2013-07-04 12:51:16 PDT --- (In reply to comment #5) > I'm struggling to understand the confusion. The problem is perfectly clear. Are you already correcting this? If not, I'll take care of it. I remember having seen this in one of my first pulls correcting map, but got confused about the fact there is an *explicit* test to do things wrong... Time to correct it for good I guess. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 13:15:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 20:15:11 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 --- Comment #7 from Peter Alexander 2013-07-04 13:15:10 PDT --- (In reply to comment #6) > (In reply to comment #5) > > I'm struggling to understand the confusion. > > The problem is perfectly clear. > > Are you already correcting this? If not, I'll take care of it. > > I remember having seen this in one of my first pulls correcting map, but got > confused about the fact there is an *explicit* test to do things wrong... Time > to correct it for good I guess. I'm not fixing it right now, go ahead. I only noticed it when I looked at the source. No idea why it's explicitly coded to be wrong... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 13:24:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 20:24:52 +0000 (UTC) Subject: [Issue 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10539 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-04 13:24:51 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/99265ca322625f9d76f2fcc530c83845d5485b37 Issue 10539 - Implicit pointer to array dereference for .ptr property fails https://github.com/D-Programming-Language/dmd/commit/c7e0c6ef1085ce74e373b6096d2af40c958e32ec Merge pull request #2296 from 9rnsr/fix10539 [REG2.063] Issue 10539 - Implicit pointer to array dereference for .ptr property fails -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 13:24:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 4 Jul 2013 20:24:59 +0000 (UTC) Subject: [Issue 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10539 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 17:25:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 00:25:55 +0000 (UTC) Subject: [Issue 10545] New: Mostly portable way to set stdout/stdin mode Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10545 Summary: Mostly portable way to set stdout/stdin mode Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-04 17:25:52 PDT --- In Phobos I'd like a (portable across different operating systems) way to set the mode of stdout/stdin (to binary or text mode). A not portable way to do in C on Windows is: setmode(fileno(stdout), O_BINARY); In Python a not portable way to do it is (works on Windows): import os, msvcrt msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) I think an almost portable way to do it is (this is a C99 version of freopen): freopen(null, "wb", stdout); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 17:55:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 00:55:09 +0000 (UTC) Subject: [Issue 10537] Forward reference error on 'yield' toy example. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10537 --- Comment #1 from Kenji Hara 2013-07-04 17:55:07 PDT --- Reduced test case: struct Iota10537 { int s,e,i; mixin Yield10537!q{ ; }; } auto skipStrings10537(T)(T source) { return ""; } mixin template Yield10537(dstring code) { alias X = typeof({ enum x = rewriteCode10537(code); }()); } dstring rewriteCode10537(dstring code) { skipStrings10537(code); // IFTI causes forward reference return ""; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 18:14:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 01:14:32 +0000 (UTC) Subject: [Issue 10537] Forward reference error on 'yield' toy example. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10537 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #2 from Kenji Hara 2013-07-04 18:14:31 PDT --- https://github.com/D-Programming-Language/dmd/pull/2298 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 18:21:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 01:21:14 +0000 (UTC) Subject: [Issue 10539] [REG][2.063] Implicit pointer to array dereference for .ptr property fails In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10539 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-04 18:21:13 PDT --- Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7e86fd874a6acc0a4dcc1250f37d15b9dbf40b97 Merge pull request #2296 from 9rnsr/fix10539 [REG2.063] Issue 10539 - Implicit pointer to array dereference for .ptr property fails Conflicts: test/runnable/xtest46.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 21:29:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 04:29:01 +0000 (UTC) Subject: [Issue 10537] Forward reference error on 'yield' toy example. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10537 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-04 21:29:00 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b275b48bad38267183e71050c5375066745e0e33 fix Issue 10537 - Forward reference error on 'yield' toy example. https://github.com/D-Programming-Language/dmd/commit/fcf2ed507123c54f6c3e99ce281ae61fba55a340 Merge pull request #2298 from 9rnsr/fix10537 [REG2.063] Issue 10537 - Forward reference error on 'yield' toy example. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 21:31:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 04:31:20 +0000 (UTC) Subject: [Issue 10537] Forward reference error on 'yield' toy example. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10537 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 4 23:19:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 06:19:20 +0000 (UTC) Subject: [Issue 10546] New: UFCS hides actual static assert failure in opDispatch Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10546 Summary: UFCS hides actual static assert failure in opDispatch Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-04 23:19:18 PDT --- From: http://forum.dlang.org/post/zxhvyfitqkbvmfseyqxr at forum.dlang.org struct Fail1 { void opDispatch(string s)() { static assert(false, "Tried to call a method on Fail1"); } } struct Fail2 { void opDispatch(string s, T)(T arg) { static assert(false, "Tried to call a method on Fail2"); } } void main() { auto fail1 = Fail1(); fail1.s(); // "no property" error instead of static asset failure auto fail2 = Fail2(); fail2.s(1); // "no property" error instead of static asset failure } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 01:59:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 08:59:10 +0000 (UTC) Subject: [Issue 10198] CTFE: Wrong code for multi-dimensional block assignment In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10198 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-05 01:59:05 PDT --- https://github.com/D-Programming-Language/dmd/pull/2094 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 01:59:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 08:59:43 +0000 (UTC) Subject: [Issue 10198] CTFE: Wrong code for multi-dimensional block assignment In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10198 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-05 01:59:42 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1962ce651883a323c73cfecbe01aa05c7bb16595 Fix issue 10198 CTFE struct Multidimensional block assignment There are two bugs. (1) The code in todt.c ignored the possibility that an initializer could be explicitly specified in the struct literal. This is not the same as an initializer specified in the declaration of the field. This wrong behaviour was actually coded into a test in test42.d. (2) The CTFE code didn't consider the multidimensional case. https://github.com/D-Programming-Language/dmd/commit/b9b5c063d7f44b879d6fde74f400ff094ba85707 Merge pull request #2094 from donc/ctfe10198multiblock Fix issue 10198 CTFE struct Multidimensional block assignment -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 02:00:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 09:00:04 +0000 (UTC) Subject: [Issue 10198] CTFE: Wrong code for multi-dimensional block assignment In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10198 --- Comment #3 from Walter Bright 2013-07-05 02:00:03 PDT --- Fixed for D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 03:05:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 10:05:44 +0000 (UTC) Subject: [Issue 10547] New: DMD accepts function templates with no body. Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10547 Summary: DMD accepts function templates with no body. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: brian-schott at cox.net --- Comment #0 from brian-schott at cox.net 2013-07-05 03:05:42 PDT --- DMD compiles the following code without complaining: int templateFunction(A, B)(A a, B b); >From the spec: "FunctionLiterals and function templates, since their function bodies are always present, infer the pure, nothrow, and @safe attributes unless specifically overridden." Either the complier or the spec is wrong. The current iteration of my grammar does not allow function bodies to be missing, since as far as I know, empty function templates are useless aside from forcing DDoc generation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 03:29:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 10:29:15 +0000 (UTC) Subject: [Issue 10547] DMD accepts function templates with no body. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10547 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim at maxim-fomin.ru --- Comment #1 from Maxim Fomin 2013-07-05 03:29:14 PDT --- Current implementation allows to split template declaration and template definition. You can place template declaration in .di file, full definition in .d file and instantiate template with specific arguments. In module, which imports .di file you can instantiate template if parameters match to those used in .d file (this is limitation as due to separate compilation it is impossible to know beforehand all potential parameters). Since instantiated function has no body, dmd issues reference to external symbol and the trick works (in such case compiler does not need template body but linker must find referenced symbols). This allows to hide template definitions in D at the cost of reducing potential possible parameters. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 03:38:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 10:38:39 +0000 (UTC) Subject: [Issue 10547] DMD accepts function templates with no body. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10547 brian-schott at cox.net changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|accepts-invalid | --- Comment #2 from brian-schott at cox.net 2013-07-05 03:38:39 PDT --- Makes sense. I'm removing "accepts-invalid" but leaving "spec". I'll have to update my parser and grammar. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 03:58:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 10:58:07 +0000 (UTC) Subject: [Issue 10548] New: [REG 2.064a] argument has no identifier Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10548 Summary: [REG 2.064a] argument has no identifier Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: yazan.dabain at gmail.com --- Comment #0 from yazan.dabain at gmail.com 2013-07-05 03:58:06 PDT --- import std.stdio, std.traits; int foo(int num, string name); void main() { void bar(int num){} static if (is(FunctionTypeOf!bar PT == __parameters)) { pragma(msg, __traits(identifier, PT[0..1])); } } Compiling this code using dmd 2.063, you get "num" printed out. In dmd 2.064a, the compiler prints: ------ main.d(8): Error: argument int has no identifier false ------ This regression is caused by commit: 877e7bf pull request: https://github.com/D-Programming-Language/dmd/pull/1102 fixing: http://d.puremagic.com/issues/show_bug.cgi?id=3646 This is blocking: https://github.com/D-Programming-Language/phobos/pull/1378 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 04:46:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 11:46:51 +0000 (UTC) Subject: [Issue 10549] New: Default object equality test not properly implemented Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10549 Summary: Default object equality test not properly implemented Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: anoneuron at gmail.com --- Comment #0 from anoneuron at gmail.com 2013-07-05 04:46:49 PDT --- In the base object class ("Object") the opEquals overload (which is inherited as the default EqualExpression operation for objects) does not appear to be implemented the way it is described. The function is defined in object_.d (http://github.com/D-Programming-Language/druntime/blob/master/src/object_.d) as this: /** * Returns !=0 if this object does have the same contents as obj. */ bool opEquals(Object o) { return this is o; } (I'm not exactly sure what "!=0" is supposed to mean there, but I'll take it to mean "true"). As I understand it, the "is" operator tests whether two object references refer to the same instance, not whether "this object does have the same contents as obj". This also contradicts the official description of EqualExpression (http://dlang.org/expression.html#EqualExpression): "For class objects, the == and != operators compare the contents of the objects." Clearly, this functionality is not satisfied by an IdentityExpression. Perhaps something like "this.tupleof == o.tupleof" would be more appropriate? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 05:49:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 12:49:15 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Status|NEW |ASSIGNED AssignedTo|nobody at puremagic.com |monarchdodra at gmail.com --- Comment #8 from monarchdodra at gmail.com 2013-07-05 05:49:13 PDT --- https://github.com/D-Programming-Language/phobos/pull/1389 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 05:57:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 12:57:32 +0000 (UTC) Subject: [Issue 9975] pointsTo asserts because of false pointer in union In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9975 --- Comment #14 from monarchdodra at gmail.com 2013-07-05 05:57:29 PDT --- (In reply to comment #13) > I'm really just wondering what business swap has asserting if there are > pointers to either of the members... Having such a pointer is a *sign* of > stink, but I don't think it is 100% certifiably wrong... in which case it > should not assert. Done: https://github.com/D-Programming-Language/phobos/pull/1390 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 06:54:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 13:54:09 +0000 (UTC) Subject: [Issue 9543] Base64.decode shouldn't require source to have known length In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9543 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #1 from monarchdodra at gmail.com 2013-07-05 06:54:07 PDT --- +1. I had to deactivate a wrong-usage unittest in base64. It was trying to test "input range", using map, which erroneously forwarded string length. I fixed *that*, and the test blew up. So I deactivated it. https://github.com/D-Programming-Language/phobos/pull/1389 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 06:58:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 13:58:36 +0000 (UTC) Subject: [Issue 6594] Xorshift as default generator In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6594 Joseph Rushton Wakeling changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.wakeling at webdrake.ne | |t --- Comment #1 from Joseph Rushton Wakeling 2013-07-05 06:58:35 PDT --- Have to register a disagreement here. The default behaviour should be statistically reliable -- choosing a faster but lower-quality RNG should be done advisedly. We shouldn't reproduce the awful situation of C/C++ where the default RNG is awful and users have to be educated to avoid it. However, we could think about easy ways to specify the default RNG type Random at compile-time. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 07:11:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 14:11:05 +0000 (UTC) Subject: [Issue 10550] New: Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 Summary: Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: joseph.wakeling at webdrake.net --- Comment #0 from Joseph Rushton Wakeling 2013-07-05 07:11:03 PDT --- The output of Xorshift32 and Xorshift160 departs strongly from uniformity. The issue for Xorshift32 can be seen clearly even in this very simple piece of code: auto rng = Xorshift32(unpredictableSeed); foreach(r; rng.take(20)) { writeln(r, "\t", rng.min, "\t", rng.max); } ... where we can see that the generated values are always much closer to rng.min than rng.max. A more sophisticated example (but still very simple) is provided in the test of uniformity in https://github.com/WebDrake/std.random.test -- specifically, in: https://github.com/WebDrake/std.random.test/blob/master/uniform.d https://github.com/WebDrake/std.random.test/blob/master/test/stats.d ... which generates millions of random numbers using uniform(0.0, 0.1, rng), divides them up into bins of width 0.05, and outputs the histogram and cumulative distribution values. For Xorshift32, this gives: Generating 10000000 random numbers in [0, 1) with XorshiftEngine!(uint, 32, 13, 17, 5) 5 1 1 10 0 1 15 0 1 20 0 1 25 0 1 30 0 1 35 0 1 40 0 1 45 0 1 50 0 1 55 0 1 60 0 1 65 0 1 70 0 1 75 0 1 80 0 1 85 0 1 90 0 1 95 0 1 100 0 1 ... while for Xorshift160 it gives: Generating 10000000 random numbers in [0, 1) with XorshiftEngine!(uint, 160, 2, 1, 4) 5 0.0535713 0.0535713 10 0.0208334 0.0744047 15 0.0446429 0.119048 20 0.047619 0.166667 25 0.0714286 0.238095 30 0.0238096 0.261905 35 0.0208333 0.282738 40 0.0416667 0.324405 45 0.0595238 0.383929 50 0.0446429 0.428572 55 0.0476191 0.476191 60 0.0595239 0.535714 65 0.0714285 0.607143 70 0.0535714 0.660714 75 0.0535713 0.714286 80 0.0744045 0.78869 85 0.0744049 0.863095 90 0.0357143 0.898809 95 0.0238095 0.922619 100 0.0773811 1 Other RNGs, including other Xorshift types, appear to generate correct proportions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 07:35:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 14:35:08 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #1 from Joseph Rushton Wakeling 2013-07-05 07:35:07 PDT --- The Xorshift32 non-uniformity can be fixed by correcting the update rule in popFront(), from: static if (bits == 32) { temp = seeds_[0] ^ (seeds_[0] << a); temp = temp >> b; seeds_[0] = temp ^ (temp << c); } to: static if (bits == 32) { temp = seeds_[0] ^ (seeds_[0] << a); temp = temp ^ (temp >> b); seeds_[0] = temp ^ (temp << c); } See p.3 of http://www.jstatsoft.org/v08/i14/paper -- the current implementation appears to be a typo when copying the first from the list of possible update rules. However, if this change is made, the Xorshift unittests fail for the checks against the reference edition: auto checking = [ [2463534242UL, 267649, 551450, 53765, 108832, 215250, 435468, 860211, 660133, 263375], [362436069UL, 2113136921, 19051112, 3010520417, 951284840, 1213972223, 3173832558, 2611145638, 2515869689, 2245824891], [521288629UL, 1950277231, 185954712, 1582725458, 3580567609, 2303633688, 2394948066, 4108622809, 1116800180, 3357585673], [88675123UL, 3701687786, 458299110, 2500872618, 3633119408, 516391518, 2377269574, 2599949379, 717229868, 137866584], [5783321UL, 93724048, 491642011, 136638118, 246438988, 238186808, 140181925, 533680092, 285770921, 462053907], [0UL, 246875399, 3690007200, 1264581005, 3906711041, 1866187943, 2481925219, 2464530826, 1604040631, 3653403911] ]; alias TypeTuple!(Xorshift32, Xorshift64, Xorshift96, Xorshift128, Xorshift160, Xorshift192) XorshiftTypes; foreach (I, Type; XorshiftTypes) { Type rnd; foreach (e; checking[I]) { assert(rnd.front == e); rnd.popFront(); } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 07:35:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 14:35:38 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #2 from Joseph Rushton Wakeling 2013-07-05 07:35:38 PDT --- I also think the choice of a, b, c values may be in error: currently we have alias XorshiftEngine!(uint, 32, 13, 17, 5) Xorshift32; ... but I think this is most likely a typo for alias XorshiftEngine!(uint, 32, 13, 17, 15) Xorshift32; as the paper states that there should be a < c and the triple 13, 17, 5 is not found among the list of valid triples (while 13, 17, 15 is). However, correcting this does not prevent the unittest fail described in the previous comment. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 07:38:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 14:38:57 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #3 from Joseph Rushton Wakeling 2013-07-05 07:38:56 PDT --- (In reply to comment #2) > I also think the choice of a, b, c values may be in error: currently we have > > alias XorshiftEngine!(uint, 32, 13, 17, 5) Xorshift32; This seems to stem from a descriptive passage at the top of p.4 of the paper, where this choice of a, b, c values is described as one of the author's favourites. However, I suspect that this is a typo as it violates the a < c rule described elsewhere in the paper and (as already stated) the 13, 17, 5 triple is not found in the table of appropriate triples for 32-bit Xorshift. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 07:41:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 14:41:12 +0000 (UTC) Subject: [Issue 6594] Xorshift as default generator In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6594 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #2 from monarchdodra at gmail.com 2013-07-05 07:41:11 PDT --- MersenneTwister is supposed to be fast though... I think the problem could have something to do with the whole "PRNG value semantic" fiasco: pragma(msg, Mt19937.sizeof); //2504u pragma(msg, Xorshift.sizeof); //16u The mersenne twister range has a size of 2.5 KB (!) The performance penalty most probably comes from passing it (by value) to algorithms or whatnot. I know for a fact this *will* cause significant slowdown. I observed this while implementing a Lagged Fibonacci PRNG, whose size varies a lot. The bigger flavors of the PRNG would make the runtime grind to a halt, while the biggest versions simply stack overflowed. ---- All this to say, I think it is not the algorithm of mersenne itself that is slow, but rather the range implementation. Until this is fixed, we *may* want to change the default. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 08:12:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 15:12:24 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #4 from Joseph Rushton Wakeling 2013-07-05 08:12:24 PDT --- Uniformity in Xorshift160 can be restored by tweaking the update rules: else static if (bits == 160) { temp = seeds_[0] ^ (seeds_[0] >> a); seeds_[0] = seeds_[1]; seeds_[1] = seeds_[2]; seeds_[2] = seeds_[3]; seeds_[3] = seeds_[4]; seeds_[4] = seeds_[4] ^ (seeds_[4] >> c) ^ temp ^ (temp >> b); } ... which faithfully reproduce what is given at the bottom of p.4 of the paper, and changing the first line to: temp = seeds_[0] ^ (seeds_[0] << a); Note that this change was pure guesswork on the grounds that other bit-values of the algorithm had this alternative formulation. It also results in a failure of the unittest on line 1032 of std.random. Unfortunately George Marsaglia has died, so we can't ask him about typos in his papers. :-( I was not able to find any erratum to the published article, but the discrepancies already identified make me suspect that it must be in error in several places. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 08:37:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 15:37:39 +0000 (UTC) Subject: [Issue 6594] Xorshift as default generator In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6594 --- Comment #3 from Joseph Rushton Wakeling 2013-07-05 08:37:38 PDT --- (In reply to comment #2) > The performance penalty most probably comes from passing it (by value) to > algorithms or whatnot. If you're passing it by value, you have bigger problems than slowdown ... :-) > I know for a fact this *will* cause significant slowdown. I observed this while > implementing a Lagged Fibonacci PRNG, whose size varies a lot. The bigger > flavors of the PRNG would make the runtime grind to a halt, while the biggest > versions simply stack overflowed. > > ---- > All this to say, I think it is not the algorithm of mersenne itself that is > slow, but rather the range implementation. Until this is fixed, we *may* want > to change the default. Fully agree that the real solution here is to change the RNGs to reference types. I don't think switching default to Xorshift is a good idea, though, even as a short term method. Apart from any other consideration, Issue #10550 should give us pause on that idea. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 10:23:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 17:23:14 +0000 (UTC) Subject: [Issue 10551] New: [CTFE] Wrong-code on passing dereferenced array pointer by ref 2 Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10551 Summary: [CTFE] Wrong-code on passing dereferenced array pointer by ref 2 Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: CTFE, wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: verylonglogin.reg at gmail.com --- Comment #0 from Denis Shelomovskij 2013-07-05 21:23:12 MSD --- Original testcase which was reduced to Issue 10243 still fails. Another reduced testcase: --- void f(ref ubyte n) { n = 1; } void g(ubyte* p) { f(p[0]); } void test() { ubyte[1] arr; //f(*arr.ptr); // now works g(arr.ptr); assert(arr == [1]); } void main() { test(); static assert((test(), true)); } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 10:24:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 17:24:07 +0000 (UTC) Subject: [Issue 10243] [CTFE] Wrong-code on passing dereferenced array pointer by ref In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10243 Denis Shelomovskij changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #4 from Denis Shelomovskij 2013-07-05 21:24:06 MSD --- (In reply to comment #3) > The original test case in this bug report works for me now, and your comment > "// now works" indicates that it is fixed for you as well? > > The code in comment 2 is a different bug. Although the effects look very > similar, it is actually independent of the original one. The bug lies in a > different part of the code. > > Generally, you should create a new bug report rather than reopening a bug, if > the test case in the original bug report has been fixed. Sorry. Created Issue 10551. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 11:17:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 18:17:12 +0000 (UTC) Subject: [Issue 10534] Addition and subtraction of delegates allowed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10534 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-05 11:17:11 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1fb7a33b2ca338628450428ba67d302616126b02 fix Issue 10534 - Addition and subtraction of delegates allowed https://github.com/D-Programming-Language/dmd/commit/d9c710351028452533241e069bdde9034fc4cde8 Merge pull request #2294 from 9rnsr/fix10534 Issue 10534 - Addition and subtraction of delegates allowed -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 11:17:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 18:17:25 +0000 (UTC) Subject: [Issue 10534] Addition and subtraction of delegates allowed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10534 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 11:20:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 18:20:31 +0000 (UTC) Subject: [Issue 10526] opDispatch with IFTI should not disable UFCS In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10526 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-05 11:20:31 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/10ce85d0d9c661843ad8bd77c23f229bf5732ca1 fix Issue 10526 - opDispatch with IFTI should not disable UFCS When opDispatch result is a function template that requires IFTI, it would be kept on `DotTemplateInstanceExp` so `ti->needsTypeInference(sc)` returns TRUE in its semantic(). UFCS dispatch should check that the opDispatch result is really valid or not, by instantiating the function template. https://github.com/D-Programming-Language/dmd/commit/11d22d63ac22eb5980b6370f5f93a2a22e995e29 Merge pull request #2292 from 9rnsr/fix_ufcs Issue 10526 - opDispatch with IFTI should not disable UFCS -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 11:20:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 18:20:44 +0000 (UTC) Subject: [Issue 10526] opDispatch with IFTI should not disable UFCS In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10526 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 11:22:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 18:22:15 +0000 (UTC) Subject: [Issue 10506] Purity should not be checked in a mixin statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10506 --- Comment #9 from github-bugzilla at puremagic.com 2013-07-05 11:22:14 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/075f1ec31be42d13be4ca44fb861dd71216701c3 fix Issue 10506 - Purity should not be checked in a mixin statement https://github.com/D-Programming-Language/dmd/commit/d16ce295dddda97d00cd3d2aabeb862e85437e02 Merge pull request #2289 from 9rnsr/fix10506 Issue 10506 - Purity should not be checked in a mixin statement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 11:22:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 18:22:32 +0000 (UTC) Subject: [Issue 10506] Purity should not be checked in a mixin statement In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10506 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 14:00:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 21:00:16 +0000 (UTC) Subject: [Issue 10552] New: Cannot apply access specifiers to individual anonymous enum members Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10552 Summary: Cannot apply access specifiers to individual anonymous enum members Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-05 14:00:15 PDT --- ----- enum { private A = 1, B = 2, } ----- $ dmd test.d > Error: basic type expected, not private -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 14:00:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 5 Jul 2013 21:00:42 +0000 (UTC) Subject: [Issue 10553] New: Access specifiers on anon enums have no effect Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10553 Summary: Access specifiers on anon enums have no effect Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-05 14:00:41 PDT --- ----- module foo; private enum { A = 1, B = 2, } ----- ----- module test; import foo; void main() { auto a = A; } ----- $ dmd test.d > I would assume using 'private' on an an enum would make all the members private, but instead it is a no-op. Note that you can't even mark individual anon members due to Issue 10552: ----- enum { private A = 1, B = 2, } ----- $ dmd test.d > Error: basic type expected, not private -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 19:27:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 02:27:43 +0000 (UTC) Subject: [Issue 10552] Cannot apply access specifiers to individual anonymous enum members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10552 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-05 19:27:42 PDT --- https://github.com/D-Programming-Language/dmd/pull/2304 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 5 19:28:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 02:28:27 +0000 (UTC) Subject: [Issue 10553] Access specifiers on anon enums have no effect In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10553 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-05 19:28:26 PDT --- https://github.com/D-Programming-Language/dmd/pull/2304 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 00:47:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 07:47:39 +0000 (UTC) Subject: [Issue 10552] Cannot apply access specifiers to individual anonymous enum members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10552 --- Comment #2 from Kenji Hara 2013-07-06 00:47:36 PDT --- (In reply to comment #0) > ----- > enum > { > private A = 1, > B = 2, > } > ----- > > $ dmd test.d > > Error: basic type expected, not private I cannot see any benefits there. You can just separate public anonymous enum and private one. private enum { A = 1, } enum { B = 2, } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 02:24:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 09:24:53 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 --- Comment #9 from github-bugzilla at puremagic.com 2013-07-06 02:24:49 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/0a710876007bf8509d4f62453311e0bb6adbc7ca Fix Issue 10543 - std.algorithm.map incorrectly uses source range length for narrow strings Strange, because there was an explicit override for strings to forward length. In any case, this is now fixed. https://github.com/D-Programming-Language/phobos/commit/201edf4c8055ca0ac0079b9a8b711b68668c7974 Merge pull request #1389 from monarchdodra/mapString Fix Issue 10543 - std.algorithm.map incorrectly uses source range length... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 02:25:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 09:25:22 +0000 (UTC) Subject: [Issue 10543] std.algorithm.map incorrectly uses source range length for narrow strings In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10543 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 02:29:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 09:29:31 +0000 (UTC) Subject: [Issue 9857] UFCS for struct opCall In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9857 --- Comment #17 from Kenji Hara 2013-07-06 02:29:24 PDT --- (In reply to comment #16) > > and to open a more detailed enhancement request for using > > local symbols with UFCS instead if that is desired. > > That's a quite different need. It needs more thinking. Thank you for the note. UFCS is designed not work for local symbols. https://github.com/D-Programming-Language/dlang.org/pull/346 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 03:35:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 10:35:26 +0000 (UTC) Subject: [Issue 10554] New: Remove size restriction from std.socket.SocketSet Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10554 Summary: Remove size restriction from std.socket.SocketSet Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: pull Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: thecybershadow at gmail.com --- Comment #0 from Vladimir Panteleev 2013-07-06 13:35:24 EEST --- The fd_set type is declared on all structures to allow the user to create an instance with an arbitrary size. This should allow SocketSet to keep its own copy of a fd_set data which is resized as needed. https://github.com/D-Programming-Language/phobos/pull/1393 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 04:46:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 11:46:39 +0000 (UTC) Subject: [Issue 10343] Cannot resolve a forward reference to a template inside global typeof In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10343 Tomoya Tanjo changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Tomoya Tanjo 2013-07-06 04:46:37 PDT --- I found it can be compiled without errors in trunk (v2.064-devel-fbbdba5). Thanks! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 05:17:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 12:17:52 +0000 (UTC) Subject: [Issue 10552] Cannot apply access specifiers to individual anonymous enum members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10552 --- Comment #3 from Henning Pohl 2013-07-06 05:17:51 PDT --- (In reply to comment #2) > I cannot see any benefits there. > You can just separate public anonymous enum and private one. > > private enum > { > A = 1, > } > enum > { > B = 2, > } This has some drawbacks: 1) You have to write a new enum. 2) You cannot take advantage of the properties of anonymous enums. 3) Constants that belong together need to be defined at the same place. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 06:03:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 13:03:47 +0000 (UTC) Subject: [Issue 10555] New: enumerator can no longer increment beyond maximum of initializer Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10555 Summary: enumerator can no longer increment beyond maximum of initializer Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-06 06:03:46 PDT --- I'm not sure if the new behaviour in git HEAD is desired or not, but this code used to compile until one or two weeks ago: enum A { A0 } enum B { B0 = A.A0, B1 } Now it errors out with Error: enum test.B overflow of enum value cast(B)cast(A)0 because dmd does not want to increment A0. More strange things: //////////////////////// enum A { A0 } enum B { B0 = A.A0, B1 = A.A0 + 1 } Error: cannot implicitly convert expression (1) of type int to A though this works enum A { A0 } enum B { B0 = A.A0 + 0, B1 } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 07:06:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 14:06:04 +0000 (UTC) Subject: [Issue 10556] New: mixin template fails overload resolution Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10556 Summary: mixin template fails overload resolution Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-06 07:06:03 PDT --- --------mixin template fooImpl(T) { static void foo(T t) {} } struct S{} mixin fooImpl!S; mixin fooImpl!int; mixin fooImpl!long; void main() { S s; int a; foo(s); foo(a); //17 } -------- hello.d 17 Error: hello.fooImpl!(int).foo at hello.d:3 conflicts with hello.fooImpl!(long).foo at hello.d:3 -------- Here, I'm using mixin template fooImpl to create a finite set of non-template functions. In particular, I'm generating the functions "foo(int)" and "foo(long)". Yet, when making the call to "foo" with an int, the compiler complains of finding multiple matches, failing to "see" that there is an exact match. Apparently, I think the compiler sees "foo" as template functions "fooImpl!long.foo(long)", so they all equally match. I think this is wrong behavior. The specs state that "If two different mixins are put in the same scope, and each define a declaration with the same name, there is an ambiguity error when the declaration is referenced", however this is clearly not the case, since "foo(s)" is correctly resolved. foo(int) and foo(long) should also correctly resolve just as well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 07:08:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 14:08:30 +0000 (UTC) Subject: [Issue 10552] Cannot apply access specifiers to individual anonymous enum members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10552 --- Comment #4 from Andrej Mitrovic 2013-07-06 07:08:29 PDT --- (In reply to comment #2) > (In reply to comment #0) > > ----- > > enum > > { > > private A = 1, > > B = 2, > > } > > ----- > > > > $ dmd test.d > > > Error: basic type expected, not private > > I cannot see any benefits there. > You can just separate public anonymous enum and private one. > > private enum > { > A = 1, > } > enum > { > B = 2, > } I see it as an unnecessary limitation, each member can have its own type and its own initializer (even its own UDA), but not an access specifier. Note that due to Issue 10552 we can use neither syntax. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 07:09:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 14:09:47 +0000 (UTC) Subject: [Issue 10556] mixin template fails overload resolution In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10556 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://d.puremagic.com/issu | |es/show_bug.cgi?id=8074 --- Comment #1 from monarchdodra at gmail.com 2013-07-06 07:09:46 PDT --- http://d.puremagic.com/issues/show_bug.cgi?id=8074 8074 is related, although it deals with "strictly non-ambiguous overloads". In this example, there are multiple matches, but one is "exact". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 07:16:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 14:16:41 +0000 (UTC) Subject: [Issue 10125] readln!dchar misdecodes Unicode non-BMP In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10125 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #2 from monarchdodra at gmail.com 2013-07-06 07:16:40 PDT --- Concurrently fixed in: https://github.com/D-Programming-Language/phobos/pull/1381 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 07:30:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 14:30:43 +0000 (UTC) Subject: [Issue 10557] New: __traits(== __parameters) should accept function pointer/delegate type Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10557 Summary: __traits(== __parameters) should accept function pointer/delegate type Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-06 07:30:42 PDT --- Recent function type and default argument improvement: https://github.com/D-Programming-Language/dmd/pull/1102 changes default arguments and parameter identifiers "volatile" on function type. The change itself makes sense, but after all, we cannot take the information from function pointer/delegate variable and function literal symbol anymore. void function(int arg = 10) fp; pragma(msg, typeof(fp)); // prints void function(int arg = 10) static if (is(typeof(fp) FP == F*, F)) { pragma(msg, F); // print void(int) static if (is(F PT == __parameters)) { // Right now here, PT does not contain any def-arg and param-id informations. pragma(msg, PT); // prints (int) } } This is expected behavior, but it is also inconvenient for some meta-programming. To get the volatile information, I'd like to propose that is(F PT == __parameters) accepts function pointer type and delegate type directly. void function(int a = 10) fp; static if (is(typeof(fp) PT1 == __parameters)) { // Currently this always fails, but will pass after this ER is implemented pragma(msg, PT1); // will print (int a = 10) } void delegate(int b = 20) dg; static if (is(typeof(dg) PT2 == __parameters)) { // Currently this always fails, but will pass after this ER is implemented pragma(msg, PT2); // will print (int b = 20) } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 07:42:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 14:42:52 +0000 (UTC) Subject: [Issue 10557] __traits(== __parameters) should accept function pointer/delegate type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10557 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-06 07:42:51 PDT --- https://github.com/D-Programming-Language/dmd/pull/2308 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 07:47:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 14:47:23 +0000 (UTC) Subject: [Issue 10548] [REG 2.064a] argument has no identifier In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10548 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Kenji Hara 2013-07-06 07:47:22 PDT --- This is expected change. After pull #1102 change, default arguments and parameter identifiers never appear in the result of FunctionTypeOf template. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 08:36:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 15:36:30 +0000 (UTC) Subject: [Issue 7364] Better Eponymous Template syntax In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7364 Tommi changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tommitissari at hotmail.com --- Comment #7 from Tommi 2013-07-06 08:36:27 PDT --- (In reply to comment #4) > Any solution should be able to replace the existing syntax completely, so the > compiler would have to parse e.g. function template blocks: > > template initOf(T) > { > T this() > {return T.init;} > } > > I think instead of using 'this' for the symbol name, 'template' would be > clearer. I think using 'out' as the symbol name would be even clearer. But I agree that 'template' is better than 'this'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 10:21:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 17:21:26 +0000 (UTC) Subject: [Issue 5911] Closure destroys the thrown Exception . In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5911 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice CC| |hsteoh at quickfur.ath.cx Severity|normal |major --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-06 10:21:24 PDT --- Heh, on git HEAD (b9b5c063d7f44b879d6fde74f400ff094ba85707), this code causes an ICE: dmd: struct.c:251: static void AggregateDeclaration::alignmember(structalign_t, unsigned int, unsigned int*): Assertion `alignment > 0 && !(alignment & (alignment - 1))' failed. Aborted -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 10:22:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 17:22:38 +0000 (UTC) Subject: [Issue 5911] Closure destroys the thrown Exception . In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5911 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-06 10:22:37 PDT --- P.S. This is on Linux 64-bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 11:10:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 18:10:07 +0000 (UTC) Subject: [Issue 10558] New: Assertion failure on struct.c:741 Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10558 Summary: Assertion failure on struct.c:741 Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: youxkei at gmail.com --- Comment #0 from Hisayuki Mima 2013-07-07 03:10:05 JST --- template Template(){} struct Struct(alias T){} alias bar = foo!(Template!()); template foo(alias T) { alias foobar = Struct!T; void fun() { alias a = foo!T; } } The above code compiled, dmd v2.064-devel-3df7dab outputs: dmd: struct.c:741: virtual void StructDeclaration::semantic(Scope*): Assertion `type->ty != Tstruct || ((TypeStruct *)type)->sym == this' failed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 13:09:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 20:09:25 +0000 (UTC) Subject: [Issue 10559] New: Symbol Undefined with Complicated Import and Subobject Graph Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10559 Summary: Symbol Undefined with Complicated Import and Subobject Graph Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: dsimcha at yahoo.com --- Comment #0 from David Simcha 2013-07-06 13:09:22 PDT --- Created an attachment (id=1230) The multi-file test case. The attached zip file is a painstakingly reduced test case that results in a symbol undefined error in the linking stage when built from the scidStuff5/ directory using the following commands: dmd -lib -release scid/storage/arraydata.d scid/storage/external.d scid/storage/cowmatrix.d scid/storage/cowarray.d scid/vector.d scid/typecons.d scid/matrix.d -ofscid.lib dmd -release -lib -of../dstats.lib dstats/*.d dmd -release dstats/distrib.d -L ../scid.lib -L ~/customd/deps/blaslapackdll.lib -L ../dstats.lib Error 42: Symbol Undefined _D4scid7storage8cowarray15__T8CowArrayTdZ8CowArray15__fieldPostBlitMFZv -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 13:19:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 20:19:52 +0000 (UTC) Subject: [Issue 10440] shared library on osx: worked in 2.062, fails in 2.063 / 2.063.2 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10440 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-06 13:19:50 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/5fc0480d13705c57daadf067801d630d1b9cd629 fix Issue 10440 - print a warning and ignore shared library sections https://github.com/D-Programming-Language/druntime/commit/4caca8b4a2f77d0a2df7c3fa833397ac694143ee Merge pull request #531 from dawgfoto/fix10440 fix Issue 10440 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 14:24:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 21:24:33 +0000 (UTC) Subject: [Issue 10560] New: Enum typed as int with value equal to 0 or 1 prefer bool over int overload Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10560 Summary: Enum typed as int with value equal to 0 or 1 prefer bool over int overload Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: yazan.dabain at gmail.com --- Comment #0 from yazan.dabain at gmail.com 2013-07-06 14:24:31 PDT --- import std.stdio; void foo(bool b) { writeln("bool"); } void foo(int i) { writeln("int"); } enum Boo : int { a = 1, b = 2, } void main() { foo(Boo.a); //prints 'bool', should print int foo(Boo.b); //prints 'int' correctly } This issue is related to http://d.puremagic.com/issues/show_bug.cgi?id=9999 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 14:27:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 21:27:49 +0000 (UTC) Subject: [Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9999 yazan.dabain at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yazan.dabain at gmail.com --- Comment #10 from yazan.dabain at gmail.com 2013-07-06 14:27:46 PDT --- A related issue: http://d.puremagic.com/issues/show_bug.cgi?id=10560 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 15:39:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 6 Jul 2013 22:39:51 +0000 (UTC) Subject: [Issue 10561] New: Regression (2.064 HEAD): anon enum members no longer have enum base type Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10561 Summary: Regression (2.064 HEAD): anon enum members no longer have enum base type Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-06 15:39:50 PDT --- ----- enum : ubyte { GL_FALSE = 0, GL_TRUE = 1, } void main() { static assert(is(typeof(GL_TRUE) == ubyte)); } ----- 2.063: $ dmd test.d > 2.064 git-head: $ dmd test.d > test.d(11): Error: static assert (is(int == ubyte)) is false -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 18:13:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 01:13:26 +0000 (UTC) Subject: [Issue 10440] shared library on osx: worked in 2.062, fails in 2.063 / 2.063.2 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10440 Martin Nowak changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 18:21:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 01:21:38 +0000 (UTC) Subject: [Issue 10561] Regression (2.064 HEAD): anon enum members no longer have enum base type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10561 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-06 18:21:37 PDT --- https://github.com/D-Programming-Language/dmd/pull/2309 Dayum, these enums. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 22:05:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 05:05:23 +0000 (UTC) Subject: [Issue 10562] New: Cannot initialize arrays by an element value when the elements are fixed-length arrays Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10562 Summary: Cannot initialize arrays by an element value when the elements are fixed-length arrays Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: acehreli at yahoo.com --- Comment #0 from Ali Cehreli 2013-07-06 22:05:22 PDT --- We know that arrays can be initialized by a single element value: void main() { int value = 1; int[2] a = value; assert(a == [ 1, 1 ]); } The bug is that it does not work when the elements are fixed-length arrays themselves: void main() { int[3] value = [ 1, 2, 3 ]; int[3][2] a = value; // <-- COMPILATION ERROR assert(a == [ [ 1, 2, 3 ], [ 1, 2, 3 ] ]); } Error: mismatched array lengths, 6 and 3 On the other hand, the array can be initialized by an element-of-an-element: void main() { // Note: This is the type of an element of array elements int value = 1; int[3][2] a = value; assert(a == [ [ 1, 1, 1 ], [ 1, 1, 1 ] ]); } Is that a feature or perhaps a consequence of the reported bug? Ali -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 6 22:13:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 05:13:32 +0000 (UTC) Subject: [Issue 10563] New: Accessing const/immutable string array in CTFE crashes dmd. Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10563 Summary: Accessing const/immutable string array in CTFE crashes dmd. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: iselix1988+dbugzilla at gmail.com --- Comment #0 from iselix1988+dbugzilla at gmail.com 2013-07-06 22:13:31 PDT --- Accessing const/immutable string array in struct/class in CTFE, cause dmd crashes by segmentation fault. See code below. ---- immutable string[] array = ["0"]; class cls{ immutable string[] array = ["0"]; } struct str{ immutable string[] array = ["0"]; } auto top(T)(T t){ return t[0]; } pragma(msg, array.top); // OK pragma(msg, cls.array.top); // SEGV pragma(msg, str.array.top); // SEGV -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 00:10:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 07:10:47 +0000 (UTC) Subject: [Issue 10562] Cannot initialize arrays by an element value when the elements are fixed-length arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10562 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim at maxim-fomin.ru --- Comment #1 from Maxim Fomin 2013-07-07 00:10:45 PDT --- >From the spec: "If a slice operator appears as the lvalue of an assignment expression, and the type of the rvalue is the same as the element type of the lvalue, then the lvalue's array contents are set to the rvalue. " Assuming that single value initialization is a semantic equivalent of slice expression, the code should work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 00:21:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 07:21:26 +0000 (UTC) Subject: [Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10560 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim at maxim-fomin.ru --- Comment #1 from Maxim Fomin 2013-07-07 00:21:26 PDT --- This is a separate issue. Boo should be Boo in the first place and int in the second. In referenced issue bool and long are overloaded, here are bool and int. If you pass 1 in such case int version should be called. Problem here is that int was converted to bool and passed to bool overload instead of int which is a bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 02:47:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 09:47:14 +0000 (UTC) Subject: [Issue 7364] Better Eponymous Template syntax In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7364 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #8 from monarchdodra at gmail.com 2013-07-07 02:47:02 PDT --- (In reply to comment #0) > Current Eponymous Template syntax forces one to repeat a template name. It's > bad because: > * Templates often have long names like `FunctionTypeOf` (or longer) so it's > just long to write `alias <...> FunctionTypeOf;`. > * If one will make a misprint in retyping a long template name he will be > punished. > * If a template is renamed (can happened with private templates) or a part of > template is moved to an internal template every using of a template name should > be changed appropriately. If one will make a mistake in this renaming, see > previous case. > > If, e.g. Alias This syntax will be added (with no more than one `alias this` > per template) Just want to point out that technically, as long as you don't create any conflicts (eg functions that overload), then you can have as many eponymous entries as you wish. template foo { void foo(){} void foo(int i){} } > things will be significantly better because lots of Phobos (a > real world library example) eponymous template aliases something. And now these > templates look terrible. More than that, `this` is a keyword and will be > highlighted in most editors unlike current syntax. > > > Inspired by "Aliasing of template results" post in NG by Alex R?nne Petersen. I have two problems with this. 1. The first is the the syntax `alias this` does not imply "shadowing" of the rest of the members. EG: template Foo { alias this = long; alias T = short; } //Later: Foo a; Foo.T b; //Error: T not a property of long ? What??? In this case, I think `alias this` does a bad parallel with *what* alias this actually does. 2. Ditto for functions: template foo { void this(){} void this(int i){} } //Template constructors? //No! eponymous template! Again, bad parralel between what "this" does in general case. -------- So if I placed my vote on something, it would rather it be on the "template" keyword, or anything else actually. I'm not sold on using "this". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 03:28:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 10:28:34 +0000 (UTC) Subject: [Issue 10031] Link to old wiki on dlang.org In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10031 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P1 CC| |monarchdodra at gmail.com Severity|normal |major --- Comment #2 from monarchdodra at gmail.com 2013-07-07 03:28:32 PDT --- +1. This needs to get fixed. Linking people to out of date resources isn't really acceptable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 04:06:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 11:06:58 +0000 (UTC) Subject: [Issue 10564] New: Errors on the Template page of the language specification Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10564 Summary: Errors on the Template page of the language specification Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nobody at puremagic.com ReportedBy: tommitissari at hotmail.com --- Comment #0 from Tommi 2013-07-07 04:06:57 PDT --- These are found on the page: http://dlang.org/template.html 1) In the spec it says: Even if template arguments are implicitly converted to the same template parameter type, they still refer to different instances: struct TFoo(int x) { } static assert(is(TFoo!(3) == TFoo!(2 + 1))); // 3 and 2+1 are both 3 of type int static assert(!is(TFoo!(3) == TFoo!(3u))); // 3u and 3 are different types ...but at least according to DMD, TFoo!(3) and TFoo!(3u) refer to the same type. 2) In the spec it says: Template arguments not implicitly deduced can have default values: void Foo(T, U=T*)(T t) { U p; ... } int x; Foo(&x); // T is int, U is int* ...but the last line should be: Foo(x); // T is int, U is int* -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 05:55:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 12:55:47 +0000 (UTC) Subject: [Issue 10548] [REG 2.064a] argument has no identifier In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10548 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | --- Comment #2 from Kenji Hara 2013-07-07 05:55:45 PDT --- Sorry, the above comment was my mistake. Finally I've concluded that the current git head behavior is *unnecessarily* restrictive. I reconsidered about it and convinced that fixing this *regression* won't introduce any dangerous semantics. I reopen this issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 05:57:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 12:57:46 +0000 (UTC) Subject: [Issue 10557] __traits(== __parameters) should accept function pointer/delegate type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10557 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #2 from Kenji Hara 2013-07-07 05:57:46 PDT --- After bug 10548 fixed, this ER would become unnecessary. So I withdraw this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 06:16:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 13:16:22 +0000 (UTC) Subject: [Issue 10565] New: Level-5 titles are missing in Language reference Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10565 Summary: Level-5 titles are missing in Language reference Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nobody at puremagic.com ReportedBy: dmitry.olsh at gmail.com --- Comment #0 from Dmitry Olshansky 2013-07-07 06:16:21 PDT --- Due to H5 macro not being defined in doc.ddoc. Pull: https://github.com/D-Programming-Language/dlang.org/pull/349#issuecomment-20570427 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 06:20:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 13:20:24 +0000 (UTC) Subject: [Issue 10566] New: Implement Unicode Collation Algorithm (UCA) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10566 Summary: Implement Unicode Collation Algorithm (UCA) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: dmitry.olsh at gmail.com --- Comment #0 from Dmitry Olshansky 2013-07-07 06:20:23 PDT --- This should become another piece of std.uni functionality. It is essential for applications such as databases and UI interfaces that try to produce natural (language and culture wise) sorting order, instead of some consistent but arbitrary. Relevant technical report: http://unicode.org/reports/tr10/ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 06:20:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 13:20:53 +0000 (UTC) Subject: [Issue 10548] [REG 2.064a] argument has no identifier In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10548 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #3 from Kenji Hara 2013-07-07 06:20:52 PDT --- https://github.com/D-Programming-Language/dmd/pull/2311 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 08:23:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 15:23:57 +0000 (UTC) Subject: [Issue 10519] Stray-paren in doc-unittest code generates wrong document In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10519 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-07 08:23:55 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9106a3877addceb893c005c423fafdcc7ffefdf1 fix Issue 10519 - Stray-paren in doc-unittest code generates wrong document https://github.com/D-Programming-Language/dmd/commit/ae5ec6160fe58e6489419f9daa77bdc907ed1b80 Merge pull request #2287 from 9rnsr/fix10519 Issue 10519 - Stray-paren in doc-unittest code generates wrong document -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 08:23:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 15:23:59 +0000 (UTC) Subject: [Issue 7656] ddoc misinterprets commented parentheses in an example In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7656 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-07 08:23:58 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0a1cb852ef3fd1cb1cae6143029ed1cddfcf3806 fix Issue 7656 - ddoc misinterprets commented parentheses in an example -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 08:24:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 15:24:04 +0000 (UTC) Subject: [Issue 7715] DDoc eats $1, $2, $3 etc. inside d_code section In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7715 --- Comment #7 from github-bugzilla at puremagic.com 2013-07-07 08:24:04 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b2a3ea72fd9f60cac38ba6008e139982649360ff fix Issue 7715 - DDoc eats $1, $2, $3 etc. inside d_code section -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 09:13:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 16:13:43 +0000 (UTC) Subject: [Issue 7715] DDoc eats $1, $2, $3 etc. inside d_code section In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7715 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ddoc Status|REOPENED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 09:13:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 16:13:45 +0000 (UTC) Subject: [Issue 7656] ddoc misinterprets commented parentheses in an example In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7656 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 09:13:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 16:13:47 +0000 (UTC) Subject: [Issue 10519] Stray-paren in doc-unittest code generates wrong document In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10519 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 13:44:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 20:44:13 +0000 (UTC) Subject: [Issue 10560] Enum typed as int with value equal to 0 or 1 prefer bool over int overload In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10560 --- Comment #2 from yazan.dabain at gmail.com 2013-07-07 13:44:11 PDT --- I certainly agree. I just wanted to note the explanation on why an int 'literal' of 1 would match a bool overload in the first place. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 13:47:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 20:47:52 +0000 (UTC) Subject: [Issue 10548] [REG 2.064a] argument has no identifier In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10548 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-07 13:47:51 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7f932696732c9f8237b039b72342e3080ddd8c11 Issue 10548 - argument has no identifier Don't strip default args and parameter names on alias declarations. Instead do it against template type arguments. https://github.com/D-Programming-Language/dmd/commit/0f36bb59d3f4be01b19510d7c625ed458f00b831 Merge pull request #2311 from 9rnsr/improveDefArgs [REG2.064a] Issue 10548 - argument has no identifier -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 13:48:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 7 Jul 2013 20:48:18 +0000 (UTC) Subject: [Issue 10548] [REG 2.064a] argument has no identifier In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10548 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 18:11:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 01:11:21 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-07 18:11:20 PDT --- Seems to be a duplicate of #8435. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 18:11:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 01:11:31 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-07 18:11:30 PDT --- cf. #10118. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 18:12:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 01:12:16 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-07 18:12:15 PDT --- Gah, I meant bug #10118. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 18:12:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 01:12:44 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-07 18:12:43 PDT --- Bug #8435, that is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 18:36:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 01:36:55 +0000 (UTC) Subject: [Issue 10558] Assertion failure on struct.c:741 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10558 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull Version|unspecified |D2 --- Comment #1 from Kenji Hara 2013-07-07 18:36:54 PDT --- https://github.com/D-Programming-Language/dmd/pull/2314 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 18:37:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 01:37:45 +0000 (UTC) Subject: [Issue 10558] Assertion failure on struct.c:741 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10558 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |regression --- Comment #2 from Kenji Hara 2013-07-07 18:37:44 PDT --- This is a regression on 2.064 alpha (git head only). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 20:44:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 03:44:36 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-07 20:44:34 PDT --- This bug is caused by two problems: 1) BigInt does not define toHash(), so two different instances of BigInt will always have a distinct hash, even if the values they represent are equal. 2) For some reason, typeid(BigInt).compare() will always return non-zero for two distinct instances of BigInt; this causes the AA code to think the two BigInts are not equal even if their hash is the same. I have the fix for (1), but still investigating (2); it may be a compiler bug, I'm not sure yet. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 21:00:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 04:00:59 +0000 (UTC) Subject: [Issue 10561] Regression (2.064 HEAD): anon enum members no longer have enum base type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10561 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-07 21:00:58 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ee39e099a9886c2fceccee2a4c3e47e114e4864f fix issue 10561 - anon enum members no longer have enum base type https://github.com/D-Programming-Language/dmd/commit/fbb0ac5bed755cac79d17048fbfd4d7345b6bb17 Merge pull request #2309 from hpohl/10561 [REG2.064a] fix issue 10561 - anon enum members no longer have enum base type -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 21:01:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 04:01:12 +0000 (UTC) Subject: [Issue 10561] Regression (2.064 HEAD): anon enum members no longer have enum base type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10561 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 21:09:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 04:09:36 +0000 (UTC) Subject: [Issue 6169] [CTFE] pure functions cannot compute constants using functions not marked as pure In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6169 --- Comment #16 from github-bugzilla at puremagic.com 2013-07-07 21:09:32 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c2647ba31e7a60ccc354e67aad3a05ceaf7b755e Remain fix for issue 6169 Add ctfeResolveProperties() which avoids purity and safety check https://github.com/D-Programming-Language/dmd/commit/d895e4e8463de991c7b3ea723803374d6f9bf36a Merge pull request #2290 from 9rnsr/fix6169 Remain fix for issue 6169 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 21:25:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 04:25:26 +0000 (UTC) Subject: [Issue 10567] New: Typeinfo.compare has unreasonable signature requirements on opCmp Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 Summary: Typeinfo.compare has unreasonable signature requirements on opCmp Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: hsteoh at quickfur.ath.cx --- Comment #0 from hsteoh at quickfur.ath.cx 2013-07-07 21:25:25 PDT --- CODE: ------------snip----------- import std.stdio; struct S { int[] data; int opCmp(const S s) const { return (data < s.data) ? -1 : (data == s.data) ? 0 : 1; } } void main() { auto s = S([1,2,3]); auto t = S([1,2,3]); writeln(s==t); writeln(typeid(s).compare(&s, &t)); // prints 16 } ------------snip----------- Here, we defined opCmp to compare the array wrapped in S, and == correctly calls the custom opCmp to return true. However, typeid(S) fails to call the custom opCmp; it appears to fall back to the default implementation of opCmp, which does a bitwise compare of S. This is a bug, because if the signature of opCmp is changed to: int opCmp(ref const S s) const { ... } then typeid(S) correctly calls the custom opCmp instead. However, requiring ref in the argument is unnecessarily restrictive. If == works correctly without requiring a ref const argument, then why should typeid(S).compare require a ref const argument? This bug is blocking issue #8435 and issue #10118. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 21:26:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 04:26:28 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #4 from hsteoh at quickfur.ath.cx 2013-07-07 21:26:26 PDT --- The fix for (2) is blocked by issue #10567. :-( -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 21:31:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 04:31:25 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-07 21:31:24 PDT --- Furthermore, if opCmp is a template function, it is never picked up in the typeinfo. This makes it impossible to make typeinfo.compare behave correctly when you need to overload opCmp on templated argument types, because an IFTI bug makes it impossible to define both a template and non-template opCmp simultaneously. Why the big deal with typeinfo.compare? If == works, isn't that good enough? It's not good enough because the AA implementation uses typeinfo.compare for key comparisons. Thus you have the situation where two AA keys compare equal on ==, and toHash is correctly defined so that the keys have equal hash values, but aa[key] does not work because typeinfo.compare uses the wrong key comparison function. This is one of the underlying issues in issue #8435 and issue #10567. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 21:34:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 04:34:10 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-07 21:34:09 PDT --- Gah, I meant issue #10118. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 23:13:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 06:13:47 +0000 (UTC) Subject: [Issue 10409] dtor / destructor not called for (rvalue) struct used in opApply In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10409 --- Comment #1 from Kenji Hara 2013-07-07 23:13:36 PDT --- I couldn't reproduce the issue on Windows7, by using release-dmd versions from 2.058 to 2.063.2. What version do you use? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 23:31:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 06:31:48 +0000 (UTC) Subject: [Issue 10544] writeln!(inout(int)) does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10544 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #1 from Kenji Hara 2013-07-07 23:31:47 PDT --- https://github.com/D-Programming-Language/phobos/pull/1397 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 23:41:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 06:41:37 +0000 (UTC) Subject: [Issue 10544] writeln!(inout(int)) does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10544 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-07 23:41:36 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/505ab39a1d22fa10cb11113c40406fd0271d0558 fix Issue 10544 - writeln!(inout(int)) does not work https://github.com/D-Programming-Language/phobos/commit/ecadde6ffd50013485273954b62fb68e6da40c82 Merge pull request #1397 from 9rnsr/fix10544 Issue 10544 - writeln!(inout(int)) does not work -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 7 23:43:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 06:43:51 +0000 (UTC) Subject: [Issue 5911] Closure destroys the thrown Exception . In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5911 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, wrong-code Platform|x86 |All --- Comment #4 from Kenji Hara 2013-07-07 23:43:48 PDT --- https://github.com/D-Programming-Language/dmd/pull/2316 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 00:04:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 07:04:36 +0000 (UTC) Subject: [Issue 10499] [REG 2.064] retro is no longer CTFE-able In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10499 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |CTFE, pull --- Comment #1 from Kenji Hara 2013-07-08 00:04:35 PDT --- https://github.com/D-Programming-Language/dmd/pull/2318 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 00:44:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 07:44:52 +0000 (UTC) Subject: [Issue 10499] [REG 2.064] retro is no longer CTFE-able In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10499 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-08 00:44:50 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6052013ceecfb67556671ba28cafeebfeb1e45d6 fix Issue 10499 - retro is no longer CTFE-able https://github.com/D-Programming-Language/dmd/commit/f2cd7d4b19c58209d684403541e93416d071e78b Merge pull request #2318 from 9rnsr/fix10499 [REG2.064a] Issue 10499 - retro is no longer CTFE-able -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 01:46:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 08:46:46 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #5 from bearophile_hugs at eml.cc 2013-07-08 01:46:42 PDT --- Maybe this bug should have a "major" importance. And maybe a warning note in site ddocs should be added in the meantime. These tests can help: http://en.wikipedia.org/wiki/Diehard_tests >Unfortunately George Marsaglia has died, so we can't ask him about typos in his papers.< Some people should live longer. Probably some of his collaborators or people that have used his generators have some errata list or some suggestions to help. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 01:49:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 08:49:04 +0000 (UTC) Subject: [Issue 6594] Xorshift as default generator In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6594 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #4 from bearophile_hugs at eml.cc 2013-07-08 01:49:01 PDT --- (In reply to comment #1) > Have to register a disagreement here. The default behaviour should be > statistically reliable -- choosing a faster but lower-quality RNG should be > done advisedly. > I don't think switching default to Xorshift is a good idea, though, > even as a short term method. Apart from any other consideration, Issue > #10550 should give us pause on that idea. I have to agree. Closed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 01:58:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 08:58:46 +0000 (UTC) Subject: [Issue 10565] Level-5 titles are missing in Language reference In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10565 Dmitry Olshansky changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Dmitry Olshansky 2013-07-08 01:58:42 PDT --- https://github.com/D-Programming-Language/dlang.org/commit/6dc43ca50c1bbb66f0462883155fcdbb37f6877b -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 02:46:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 09:46:56 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 Joseph Rushton Wakeling changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #6 from Joseph Rushton Wakeling 2013-07-08 02:46:40 PDT --- (In reply to comment #5) > Maybe this bug should have a "major" importance. And maybe a warning note in > site ddocs should be added in the meantime. Agree with the "major" importance, tweaked accordingly. > These tests can help: > http://en.wikipedia.org/wiki/Diehard_tests These are now a little out of date, but there is the "dieharder" suite which is actually available as a utility in many Linux distros. I plan on incorporating that into my test suite -- I think it should be as simple as just getting D to generate random variates using whatever method and then piping them through to dieharder. > Some people should live longer. Probably some of his collaborators or people > that have used his generators have some errata list or some suggestions to > help. I did not find anything yet, but I'll keep looking. I assumed that his homepage would still exist with remarks like this on it, but didn't track down anything useful so far. There are other people who've written follow-up papers on Xorshift who could be worth contacting. I may do that if I can't find obvious documentary material. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 02:54:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 09:54:29 +0000 (UTC) Subject: [Issue 10409] dtor / destructor not called for (rvalue) struct used in opApply In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10409 Marco Leise changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #2 from Marco Leise 2013-07-08 02:54:27 PDT --- (In reply to comment #1) > I couldn't reproduce the issue on Windows7, by using release-dmd versions from > 2.058 to 2.063.2. What version do you use? I was using GDC and LDC. It really doesn't happen with DMD. I'll mark this as invalid and open new reports for the other compilers. Thanks for looking into this anyway! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 03:19:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 10:19:56 +0000 (UTC) Subject: [Issue 10544] writeln!(inout(int)) does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10544 gerleim changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gerleim2 at gmail.com --- Comment #3 from gerleim 2013-07-08 03:19:54 PDT --- Sorry if I am writing something silly, it's been a while ago I programed in D, it seems I skipped the whole inout thing. Feel free to modify/delete my comment or create new issue as you see fit. Isn't there a similar problem with Unsigned(T)? Something like unittest { alias Unsigned!(inout(int)) U4; static assert(is(U4 == inout(uint))); } What I get with Unqual (with the original writln issue) is that there is a problem with Unqual!(Unsigned!T), while Unqual!(T) does compile. In code: module main; import std.traits; int main(string[] argv) { const int x = 1; //TestCallGood(x); TestCallBad(x); return 0; } /*public void TestCallGood(int value) { Foo(value); }*/ public void TestCallBad(inout int value) { Foo(value); } public void Foo(T)(T value) { Unsigned!T z; //Unsigned!(inout(int)) is used as a type Unqual!(Unsigned!T) vBad = value; //template instance Unqual!(__T4ImplTNgiZ) does not match template declaration Unqual(T) Unqual!(T) vGood = value; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 03:39:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 10:39:30 +0000 (UTC) Subject: [Issue 10568] New: CTFE rejects function pointer safety casts Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10568 Summary: CTFE rejects function pointer safety casts Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: clugdbug at yahoo.com.au --- Comment #0 from Don 2013-07-08 03:39:29 PDT --- @safe void safetyDance() {} int isItSafeToDance() { void function() @trusted yourfriends = &safetyDance; void function() @safe nofriendsOfMine = yourfriends; return 1; } static assert(isItSafeToDance()); --- bug.d(6): Error: reinterpreting cast from @trusted void()* to @safe void()* is not supported in CTFE bug.d(10): called from here: isItSafeToDance() bug.d(10): while evaluating: static assert(isItSafeToDance()) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 03:45:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 10:45:15 +0000 (UTC) Subject: [Issue 10558] Assertion failure on struct.c:741 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10558 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-08 03:45:14 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ec1330d512707160628a2b235677cd36a63d390b fix Issue 10558 - Assertion failure on struct.c:741 A template instance on temlpate argument may not have yet valid `Dsymbol::ident`, so should use `Dsymbol::getIdent()` for hash calculation. https://github.com/D-Programming-Language/dmd/commit/c0c21f378467fab8e1ba933ccbdcd05336ee33b4 Merge pull request #2314 from 9rnsr/fix10558 [REG2.064a] Issue 10558 - Assertion failure on struct.c:741 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 03:45:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 10:45:26 +0000 (UTC) Subject: [Issue 10558] Assertion failure on struct.c:741 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10558 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 03:54:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 10:54:17 +0000 (UTC) Subject: [Issue 10498] `__traits(compiles, ...)` affect program behaviour In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10498 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-08 03:54:15 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/abbbbc419d0c792a04f715fcd8c60831764dc294 fix Issue 10498 - `__traits(compiles, ...)` affect program behaviour https://github.com/D-Programming-Language/dmd/commit/6c6765783609e06ef9634f16f6d6a2035da8ec8f Merge pull request #2280 from 9rnsr/fix10498 [REG2.061] Issue 10498 - `__traits(compiles, ...)` affect program behaviour -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 04:46:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 11:46:22 +0000 (UTC) Subject: [Issue 10569] New: std.traits: EnumMembers, isExpressionTuple, isTypeTuple & Largest balks at large input Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10569 Summary: std.traits: EnumMembers, isExpressionTuple, isTypeTuple & Largest balks at large input Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: simen.kjaras at gmail.com --- Comment #0 from Simen Kjaeraas 2013-07-08 04:46:19 PDT --- The templates EnumMembers, isExpressionTuple, isTypeTuple and Largest in std.traits fail due to recursive template expansion when instantiated with large inputs (>500): import std.traits : EnumMembers; mixin({ import std.conv : to; string s = "enum m {"; foreach (i; 0..500) { s ~= "m" ~ to!string(i) ~ ","; } return s ~ "}"; }()); EnumMembers!m; // Error: template instance std.traits.EnumMembers!(m).WithIdentifier!("m498") recursive expansion -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 04:47:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 11:47:36 +0000 (UTC) Subject: [Issue 10569] std.traits: EnumMembers, isExpressionTuple, isTypeTuple & Largest balks at large input In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10569 --- Comment #1 from Simen Kjaeraas 2013-07-08 04:47:35 PDT --- Pull request: https://github.com/D-Programming-Language/phobos/pull/1400 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 04:49:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 11:49:35 +0000 (UTC) Subject: [Issue 10568] CTFE rejects function pointer safety casts In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10568 --- Comment #1 from github-bugzilla at puremagic.com 2013-07-08 04:49:34 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b60c0d71a7cff7c0a0bd33df13fd591caceda911 Fix issue 10568 CTFE rejects function pointer safety casts We need to check for function pointer covariance https://github.com/D-Programming-Language/dmd/commit/7258322abba09d2347401be15c0b6a8c75fed34f Merge pull request #2319 from donc/ctfeCastSafety Fix issue 10568 CTFE rejects function pointer safety casts -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 04:52:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 11:52:48 +0000 (UTC) Subject: [Issue 10570] New: Example of `how` function for AutoImplement should work for non-abstract class Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10570 Summary: Example of `how` function for AutoImplement should work for non-abstract class Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: ttanjo at gmail.com --- Comment #0 from Tomoya Tanjo 2013-07-08 04:52:47 PDT --- The generateLogger function is an example of `how` function for std.typecons.AutoImplement and is defined in the comment of AutoImplement. It works for interface and abstract class, but it does not work for the non-abstract class with a method that returns non-string (e.g. void). The reason is that it only consider the return type of itself, not the return type of method to be overridden. The following code reproduce the problem. It should be compiled succesfully but it does not: ---- // It is coped from the comment of std.typecons.AutoImplement. // Prints log messages for each call to overridden functions. string generateLogger(C, alias fun)() @property { enum qname = C.stringof ~ "." ~ __traits(identifier, fun); string stmt; stmt ~= q{ struct Importer { import std.stdio; } }; stmt ~= `Importer.writeln("Log: ` ~ qname ~ `(", args, ")");`; static if (!__traits(isAbstractFunction, fun)) { static if (is(typeof(return) == void)) // typeof(return) is always string! stmt ~= q{ parent(args); }; else stmt ~= q{ auto r = parent(args); Importer.writeln("--> ", r); return r; }; } return stmt; } // A class to be overridden class Foo{ void bar(int a) { } } // Logger template template Logger(Base) { import std.typecons; alias Logger = AutoImplement!(Base, generateLogger, isThrowable); } // to avoid overriding toHash (it is nothrow but writeln is not nothrow) template isThrowable(alias fun) { import std.traits; enum isThrowable = !functionAttributes!fun || (functionAttributes!fun & !FunctionAttribute.nothrow_); } void main() { auto foo = new Logger!Foo(); foo.bar(13); } ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 04:53:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 11:53:06 +0000 (UTC) Subject: [Issue 10571] New: formattedWrite error with delegate and string Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10571 Summary: formattedWrite error with delegate and string Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: yebblies at gmail.com --- Comment #0 from yebblies 2013-07-08 21:53:05 EST --- I can't format a string into a delegate taking a 'const char[]'. This seems wrong to me. ---------------------------------- import std.format; void main() { string buf; formattedWrite((in char[] s) { buf ~= s; }, "%s", "hello"); assert(buf == "hello"); } ---------------------------------- DMD v2.064 DEBUG F:\documents\desktop\d\sourcecode\phobos\std\range.d(611): Error: static assert "Cannot put a dchar into a void delegate(const(char[])) nothrow @safe" F:\documents\desktop\d\sourcecode\phobos\std\format.d(1752): instantiated from here: put!(void delegate(const(char[])) nothrow @safe, dchar) F:\documents\desktop\d\sourcecode\phobos\std\format.d(2146): instantiated from here: formatValue!(void delegate(const(char[])) nothrow @safe, dchar, char) F:\documents\desktop\d\sourcecode\phobos\std\format.d(1790): instantiated from here: formatRange!(void delegate(const(char[])) nothrow @safe, string, char) F:\documents\desktop\d\sourcecode\phobos\std\format.d(2996): ... (1 instantiations, -v to show) ... F:\documents\desktop\d\sourcecode\phobos\std\format.d(420): instantiatedfrom here: formatGeneric!(void delegate(const(char[])) nothrow @safe, string, char) testx.d(7): instantiated from here: formattedWrite!(void delegate(const(char[]) s) nothrow @safe, char, string) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 05:58:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 12:58:52 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #7 from Joseph Rushton Wakeling 2013-07-08 05:58:49 PDT --- What I'd really like is to have a source for the checking values for Xorshift used in the unittests. Masahiro, do you recall how you obtained these values? They're not in Marsaglia's paper, and Google searches to track down their source are proving fruitless. :-( -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 06:09:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 13:09:37 +0000 (UTC) Subject: [Issue 6594] Xorshift as default generator In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6594 --- Comment #5 from Joseph Rushton Wakeling 2013-07-08 06:09:36 PDT --- (In reply to comment #4) > I have to agree. > Closed. Just to note, for future reference -- the Xorshift generators have been criticized by other authors on a number of grounds -- see e.g.: http://dx.doi.org/10.1145/1113316.1113319 [PDF preprint copy: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.63.7497&rep=rep1&type=pdf ] However, there are some successors which look promising: http://arxiv.org/abs/1004.3115 [This work was originally published in an Australian journal but the preprint copy seems to be the only one readily available.] So, I think there is future scope for replacing MT with a faster, simpler and high-quality algorithm. I also recently came across some further work extending MT to work with SIMD and GPU implementations, which might be worth looking into: http://www.math.sci.hiroshima-u.ac.jp/~saito/articles/sfmt.pdf http://arxiv.org/abs/1005.4973v3 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 06:42:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 13:42:41 +0000 (UTC) Subject: [Issue 10572] New: Test suite for std.random Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10572 Summary: Test suite for std.random Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: joseph.wakeling at webdrake.net --- Comment #0 from Joseph Rushton Wakeling 2013-07-08 06:42:39 PDT --- Random number generation in Phobos needs an effective battery of tests to ensure that users are being delivered a solution of sufficient statistical quality. Part of this can be done in unittests, e.g. testing PRNGs' output against sequences from reference implementations. However, more rigorous tests of randomness require extensive computation and would be too time- and resource-intensive for inclusion in the standard Phobos test suite. So, I propose the creation of an independent test suite specifically for use with std.random. To the greatest possible degree this suite should re-use existing established tools rather than re-implementing known tests. Some examples include: * TestU01 , an extensive suite of tests which can be applied in varying degrees of intensity (from SmallCrush, 10 tests which take a total of about 2 mins, to BigCrush, 106 tests which take a total of about 12 hours). * Dieharder , a successor to Marsiglia's Diehard battery of tests which is readily available in Linux distros. The suite could also include a number of simpler "eye" tests which allow developers to check that their work does not introduce "obvious" departures from statistical correctness. Its purpose should be doubly to allow Phobos contributors to make fast working checks on the statistical validity of their code while developing or debugging, and to allow Phobos maintainers to enforce rigorous quality standards when accepting changes to std.random. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 06:51:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 13:51:09 +0000 (UTC) Subject: [Issue 10572] Test suite for std.random In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10572 --- Comment #1 from Joseph Rushton Wakeling 2013-07-08 06:51:08 PDT --- As part of the work of building this suite, I suggest we take the opportunity to engage in some community-building. We should aim to engage a network of experts who are sympathetic to our efforts to construct a suite of high-quality random number tools. In turn we should aim to serve these experts via the D language -- it would be good to see D being adopted as the computational lingua franca in these areas of research work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 07:08:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 14:08:44 +0000 (UTC) Subject: [Issue 10573] New: Weird linking problem with associative array cast [DMD 2.63] Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10573 Summary: Weird linking problem with associative array cast [DMD 2.63] Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: kozzi11 at gmail.com --- Comment #0 from Daniel Kozak 2013-07-08 07:08:43 PDT --- With new DMD I have some issue when linking: obj/Debug/TestD.o: In function `_D6object40__T16AssociativeArrayTiTC7handler5mysqlZ16AssociativeArray6rehashMFNdZHiC7handler5mysql': /usr/include/d/druntime/import/object.di:484: undefined reference to `_D26TypeInfo_HiC7handler5mysql6__initZ' With LDMD2 and DMD 2.62 everything seems ok. Problematic code: //---- main.d ----// module main; import handler; void main(string[] args) {} //---- handler.d ----// module handler; abstract class base {} class mysql : base {} class handler { private mysql[int] mysql_servers; public void foo() { base[int] hServers = cast(base[int])mysql_servers; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 07:28:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 14:28:27 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #8 from Masahiro Nakagawa 2013-07-08 07:28:26 PDT --- (In reply to comment #7) > What I'd really like is to have a source for the checking values for Xorshift > used in the unittests. Masahiro, do you recall how you obtained these values? > They're not in Marsaglia's paper, and Google searches to track down their > source are proving fruitless. :-( I remember correctly, I generated test cases from paper based C implementation. I implemented C version first and generated test cases for D unittest. After that, I implemented XorshiftEngine for D-ish code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 07:51:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 14:51:05 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #9 from Joseph Rushton Wakeling 2013-07-08 07:51:04 PDT --- (In reply to comment #8) > I remember correctly, I generated test cases from paper based C implementation. > I implemented C version first and generated test cases for D unittest. > After that, I implemented XorshiftEngine for D-ish code. Ahhh, OK. Then I think we can reasonably assume that these test sequences, like the code in std.random, reflect typos in Marsaglia's paper. For Xorshift32 we can see that Marsaglia's C implementation at the very top of p.32 contains at least one typo -- the second bitshift y=(y>>17) should be y^=(y>>17). I am strongly suspicious that there is a second typo for the value of c, which should be 15 rather than 5. It's definitely not the only such typo in the paper -- Panneton and L'Ecuyer (2005) note that the (a, b, c) triple (9, 5, 1) should be (9, 5, 14). In any case, we lose nothing by using the triple (13, 17, 15) since it's acknowledged in the paper as a valid choice. For Xorshift160 I think that the code given has a typo for the bitshift with respect to a, as in all other such code examples the bitshift is in the opposite direction to that for b and c. In general, the bitshifts seem to follow a rule of two in one direction, one in the other. In summary, I think we can proceed as follows: * confirm with experts in the field the typos in the paper * generate new checking sequences with corrected versions of the C code * correct the D code and unittests accordingly I am actually inclined to jump ahead with getting the patches to Phobos done, because I'm pretty confident my analysis here is correct :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 07:55:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 14:55:36 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #5 from hsteoh at quickfur.ath.cx 2013-07-08 07:55:34 PDT --- https://github.com/D-Programming-Language/phobos/pull/1402 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 07:55:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 14:55:52 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-08 07:55:51 PDT --- https://github.com/D-Programming-Language/phobos/pull/1402 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 08:33:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 15:33:17 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-08 08:33:16 PDT --- Temporary workaround: define int opCmp(ref const T t) const *before* any of the other opCmp overloads, and have it redirect to one of them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 09:26:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 16:26:05 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #10 from Masahiro Nakagawa 2013-07-08 09:26:03 PDT --- (In reply to comment #9) > ... > In summary, I think we can proceed as follows: > > * confirm with experts in the field the typos in the paper > > * generate new checking sequences with corrected versions of the C code > > * correct the D code and unittests accordingly > > I am actually inclined to jump ahead with getting the patches to Phobos done, > because I'm pretty confident my analysis here is correct :-) I rechecked the paper and I agree with you (y^=, a < c and 160's >>) So I think we can fix this paper derived bugs. Could you send the pull request? After passed auto tester, I will merge it. On the other hand, confirm the typos is good for future generations. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 09:47:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 16:47:09 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #11 from Joseph Rushton Wakeling 2013-07-08 09:47:04 PDT --- (In reply to comment #10) > I rechecked the paper and I agree with you (y^=, a < c and 160's >>) > So I think we can fix this paper derived bugs. > Could you send the pull request? > After passed auto tester, I will merge it. Yes, I'll get that submitted either later this evening or tomorrow. :-) > On the other hand, confirm the typos is good for future generations. Agree. I also think it could be a good way to begin outreach to the PRNG academic community -- see: http://d.puremagic.com/issues/show_bug.cgi?id=10572 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 10:05:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 17:05:37 +0000 (UTC) Subject: [Issue 10574] New: "auto ref" fails to match when IFTI succeeds (strip to level const) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 Summary: "auto ref" fails to match when IFTI succeeds (strip to level const) Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-08 10:05:36 PDT --- Basically, an "immutable(int[])" will not match "auto ref T[]", when it does match "T[]". Example: //-------- import std.stdio; version(all) { void foo(T)(auto ref T[] i) { writeln(typeof(i).stringof); } } else { void foo(T)(T[] i) { writeln(typeof(i).stringof); } void foo(T)(ref T[] i) { writeln(typeof(i).stringof); } } void main() { immutable(int[]) i; foo(i); } //-------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 11:34:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 18:34:10 +0000 (UTC) Subject: [Issue 10409] dtor / destructor not called for (rvalue) struct used in opApply In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10409 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw at ubuntu.com --- Comment #3 from Iain Buclaw 2013-07-08 11:34:09 PDT --- >From the backend's perspective, the frontend represents the code in this way: try { DestroyMe __sl5; DestroyMe.opApply (&__sl5, {.object=0B, .func=__foreachbody6}); apply.DestroyMe.~this (&__sl5); } catch (struct Throwable &) { } try { struct DestroyMe lvalue; try { DestroyMe.opApply (&lvalue, {.object=0B, .func=__foreachbody8}); } finally { apply.DestroyMe.~this (&lvalue); } } catch (struct Throwable &) { } In this instance, you could either say that it is the job of the backend to wrap ExpDtorStatement's in try{} finally{} blocks, or fix the frontend to generate a matching representation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 11:36:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 18:36:08 +0000 (UTC) Subject: [Issue 10409] dtor / destructor not called for (rvalue) struct used in opApply In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10409 Marco Leise changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 11:54:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 18:54:41 +0000 (UTC) Subject: [Issue 10575] New: struct and alloca cause internal error Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10575 Summary: struct and alloca cause internal error Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: maximechevalierb at gmail.com --- Comment #0 from Maxime Chevalier-Boisvert 2013-07-08 11:54:40 PDT --- Created an attachment (id=1231) failing test case Using alloca in a function with a struct that has a destructor seems to cause an internal compiler error in DMD. The following error message results: Internal error: eh.c 54 A failing test case is attached. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 12:10:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 19:10:27 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 Steven Schveighoffer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schveiguy at yahoo.com --- Comment #1 from Steven Schveighoffer 2013-07-08 12:10:26 PDT --- For clarification, the error displayed for the given code is: Error: template testautoref.foo(T)(auto ref T[] i) cannot deduce template function from argument types !()(immutable(int[])) And it does match immutable(int)[]. As implied, if you change to version(none), it does indeed work. const(int[]) also fails. A workaround that seems to work, but I don't really like it, is to add overloads for immutable(T[]) and const(T[]) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 12:15:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 19:15:08 +0000 (UTC) Subject: [Issue 10409] dtor / destructor not called for (rvalue) struct used in opApply In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10409 --- Comment #4 from Iain Buclaw 2013-07-08 12:15:06 PDT --- (In reply to comment #3) > In this instance, you could either say that it is the job of the backend to > wrap ExpDtorStatement's in try{} finally{} blocks, or fix the frontend to > generate a matching representation. Hmmm... I meant Expression::toElemDtor. :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 12:37:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 19:37:42 +0000 (UTC) Subject: [Issue 5911] Closure destroys the thrown Exception . In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5911 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-08 12:37:40 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3f95fdda2595c949af9070887a4b50e5fe79e214 fix Issue 5911 - Closure destroys the thrown Exception https://github.com/D-Programming-Language/dmd/commit/88b794d01348c7d0b39ebc2e27e70e7cf1afb66d Merge pull request #2316 from 9rnsr/fix5911 Issue 5911 - Closure destroys the thrown Exception -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 12:39:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 19:39:19 +0000 (UTC) Subject: [Issue 5911] Closure destroys the thrown Exception . In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5911 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 12:49:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 19:49:11 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #12 from Joseph Rushton Wakeling 2013-07-08 12:49:09 PDT --- (In reply to comment #11) > (In reply to comment #10) > > I rechecked the paper and I agree with you (y^=, a < c and 160's >>) > > So I think we can fix this paper derived bugs. > > Could you send the pull request? > > After passed auto tester, I will merge it. > > Yes, I'll get that submitted either later this evening or tomorrow. :-) First step -- corrected reference code: https://github.com/WebDrake/xorshift I first implemented versions that match _exactly_ Marsaglia's sample code, and that reproduce the checking values from std.random: https://github.com/WebDrake/xorshift/blob/4305bd5a0ac4d94f59505713a085b34d2e4d482e/xorshift.c Subsequent commits correct the typos we've observed, and so the current version can be used to generate updated checking values. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 13:21:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 20:21:37 +0000 (UTC) Subject: [Issue 10573] Weird linking problem with associative array cast [DMD 2.63] In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10573 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #1 from Andrej Mitrovic 2013-07-08 13:21:36 PDT --- I can recreate this on win32 but only with the -g flag. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 13:56:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 20:56:39 +0000 (UTC) Subject: [Issue 10573] Weird linking problem with associative array cast [DMD 2.63] In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10573 --- Comment #2 from Andrej Mitrovic 2013-07-08 13:56:38 PDT --- Btw, I'd be very careful using casts on hashes like that, there's no runtime checking when you cast hashes, even if the key or value is a base class which is casted to a derived class. For example: ----- class A { } class B : A { void call() { } } void main() { A[int] a; a[1] = new A(); B[int] b = cast(B[int])a; // unsafe, no exceptions thrown b[1].call(); // crash } ----- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 14:31:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 21:31:55 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #13 from Joseph Rushton Wakeling 2013-07-08 14:31:53 PDT --- Pull request submitted: https://github.com/D-Programming-Language/phobos/pull/1403 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 15:01:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 22:01:19 +0000 (UTC) Subject: [Issue 9852] Empty associative array crashes program In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9852 --- Comment #5 from hsteoh at quickfur.ath.cx 2013-07-08 15:01:17 PDT --- https://github.com/D-Programming-Language/druntime/pull/541 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 15:09:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 22:09:41 +0000 (UTC) Subject: [Issue 10525] Struct as key in Associative array ignores value semantics In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10525 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-08 15:09:40 PDT --- This is not really a bug. Structs by default are bitwise-compared. If you want structs to be deep-compared, you need to define toHash and opCmp: struct S { char[] str; size_t toHash() const { // Just use arrays' builtin hash function, no need to reinvent your own return typeid(str).getHash(&str); } // Note: this exact function signature must be used; // DMD is currently very picky about this. int opCmp(ref const S s) const { return typeid(str).compare(&str, &s.str); } } Once these two pieces are in place, your struct should work correctly as AA key. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 15:12:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 22:12:07 +0000 (UTC) Subject: [Issue 10381] Nonsense associative array comparison In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10381 --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-08 15:12:06 PDT --- IMO, comparing AA's with < should be a compile-time error. AA's are unordered so it makes no sense to use < to compare them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 15:58:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 8 Jul 2013 22:58:44 +0000 (UTC) Subject: [Issue 10381] Nonsense associative array comparison In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10381 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #2 from bearophile_hugs at eml.cc 2013-07-08 15:58:43 PDT --- (In reply to comment #1) > IMO, comparing AA's with < should be a compile-time error. AA's are unordered > so it makes no sense to use < to compare them. There are some meaningful (and occasionally useful) operations done on whole associative arrays, like testing if the keys of an associative array are a subset (or strict subset) of the keys of another associative array. But probably it's not the best idea to use < to perform similar set comparisons... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 17:03:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 00:03:20 +0000 (UTC) Subject: [Issue 9852] Empty associative array crashes program In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9852 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-08 17:03:17 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/64679623a321f69ef28feb482711fd5a85cb1d39 Fix issue 9852. _aaEqual should not dereference null when given a null AA. https://github.com/D-Programming-Language/druntime/commit/33b1c818cbde36e5c6d721faf791beeacaee9fb1 Merge pull request #541 from quickfur/issue9852 Fix issue 9852. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 17:12:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 00:12:28 +0000 (UTC) Subject: [Issue 9852] Empty associative array crashes program In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9852 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 17:16:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 00:16:22 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 Martin Nowak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code at dawg.eu --- Comment #2 from Martin Nowak 2013-07-08 17:16:21 PDT --- Just an educated guess. The problem seems to be that the value is a L-value so the signature becomes (ref T[]) which cannot match immutable(int[]). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 18:01:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 01:01:28 +0000 (UTC) Subject: [Issue 10576] New: enforce/enforceEx overload for returntype Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10576 Summary: enforce/enforceEx overload for returntype Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: admin at dav1d.de --- Comment #0 from David 2013-07-08 18:01:27 PDT --- auto foo() { int invalid_value = 3; return 3; } auto result = enforceEx!(Exception, 3)(foo()); Currently this code doesn't work as expected: auto result = enforceEx!Exception(foo() != 3); result would be a boolean instead of the result of 3. If there is an overload which would take either a value to compare to or even a delagate (alias fun?) this would make enforceEx much more useful. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 18:05:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 01:05:37 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 --- Comment #3 from Kenji Hara 2013-07-08 18:05:35 PDT --- (In reply to comment #2) > Just an educated guess. The problem seems to be that the value is a L-value so > the signature becomes (ref T[]) which cannot match immutable(int[]). That's exactly the current compiler's behavior. "auto ref" always behave as "ref" parameter against lvalue argument `i`, then T[] cannot deduce type T from immutable(int[]). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 18:09:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 01:09:21 +0000 (UTC) Subject: [Issue 10576] enforce/enforceEx overload for returntype In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10576 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #1 from Andrej Mitrovic 2013-07-08 18:09:20 PDT --- What David means is he wants the ability to both return the value and throw if that value is invalid, however simply using (!value) as enforceEx currently does will not work properly with e.g. signed integers. For example: ----- import std.exception; int returnValid() { return 5; } int returnInvalid() { return -1; } void main() { int x = enforceEx!Exception(returnValid()); assert(x == 5); // ok // this doesn't throw, but we want -1 to signal failure enforceEx!Exception(returnInvalid()); // so as a workaround we use the check inline, however.. int y = enforceEx!Exception(returnInvalid() != -1); // .. it is not useful for the return value since the value becomes a bool int z = enforceEx!Exception(returnValid() != -1); assert(z == 5); // now this fails } ----- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 18:10:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 01:10:09 +0000 (UTC) Subject: [Issue 6594] Xorshift as default generator In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6594 --- Comment #6 from bearophile_hugs at eml.cc 2013-07-08 18:10:07 PDT --- (In reply to comment #5) > I also recently came across some further work extending MT to work with SIMD > and GPU implementations, which might be worth looking into: > http://www.math.sci.hiroshima-u.ac.jp/~saito/articles/sfmt.pdf The SIMD MT seems very fit for Phobos (including its block-generation and the variant that generates directly two doubles at a time). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 18:32:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 01:32:50 +0000 (UTC) Subject: [Issue 10577] New: 2.063 Mixin Regression (works with 2.062) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10577 Summary: 2.063 Mixin Regression (works with 2.062) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: puneet at coverify.org --- Comment #0 from Puneet Goel 2013-07-08 18:32:49 PDT --- Here is the minimal code to reproduce. Works with version 2.062. With version 2.063 and latest github snapshot, I get an error: test.d(37): Error: function test.derived.foo multiple overrides of same function // Code starts here enum sync; public template get_sync(size_t I, A...) { static if(I == A.length) enum bool get_sync = false; else static if(is(A[I] == sync)) enum bool get_sync = true; else enum bool get_sync = get_sync!(I+1, A); } template add_sync(T, size_t ITER=0) { static if(ITER == (__traits(derivedMembers, T).length)) { enum string add_sync = ""; } else { enum string mem = __traits(derivedMembers, T)[ITER]; enum string add_sync = "static if(! __traits(isVirtualMethod, " ~ mem ~ ")) {" ~ "mixin(add_sync!(get_sync!(0, __traits(getAttributes, " ~ mem ~ ")), \"" ~ mem ~ "\"));} " ~ add_sync!(T, ITER+1); } } template add_sync(bool A, string M) { static if(A) { enum string add_sync = " auto " ~ M[1..$] ~ "() {synchronized(this) return " ~ M ~ ";}"; } else { enum string add_sync = ""; } } class base { public void foo() {} } class derived : base { mixin(add_sync!(derived)); @sync private bool _bar; public override void foo() {} } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 18:48:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 01:48:29 +0000 (UTC) Subject: [Issue 10578] New: Postfix AA increment not considered side-effect Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10578 Summary: Postfix AA increment not considered side-effect Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: hsteoh at quickfur.ath.cx --- Comment #0 from hsteoh at quickfur.ath.cx 2013-07-08 18:48:28 PDT --- CODE: ----SNIP---- import std.stdio; struct S { int x; ref S opUnary(string op)() if (op=="++") { x++; return this; } } void main() { S[int] aa; aa[0]++; // this is line 14 writeln(aa[0]); } ----SNIP---- DMD git HEAD (88b794d0) output: test.d(14): Error: var has no effect in expression (__pitmp1583) Changing aa[0]++ to ++aa[0] makes the problem go away. The error is wrong, since postfix ++ is a side-effect. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:11:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:11:39 +0000 (UTC) Subject: [Issue 10499] [REG 2.064] retro is no longer CTFE-able In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10499 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:12:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:12:15 +0000 (UTC) Subject: [Issue 10498] `__traits(compiles, ...)` affect program behaviour In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10498 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:30:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:30:43 +0000 (UTC) Subject: [Issue 10380] Wrong code using associative array as key type in associative array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10380 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-08 19:30:41 PDT --- Do you have any failing unittest for this bug? I can't seem to reproduce the problem in git HEAD. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:32:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:32:51 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #6 from hsteoh at quickfur.ath.cx 2013-07-08 19:32:50 PDT --- Related to issue #10380. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:33:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:33:25 +0000 (UTC) Subject: [Issue 1926] TypeInfo methods getHash, compare, equals unimplemented for AA, function and delegate In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1926 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-08 19:33:21 PDT --- Related to issue #10380. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:33:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:33:38 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #7 from hsteoh at quickfur.ath.cx 2013-07-08 19:33:37 PDT --- Gah, ignore the previous note, I posted it to the wrong bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:42:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:42:15 +0000 (UTC) Subject: [Issue 10579] New: regression 062=>063: Cannot interpret TypeInfo at compile time Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10579 Summary: regression 062=>063: Cannot interpret TypeInfo at compile time Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-08 19:42:14 PDT --- dmd main.d ---- main.d: void main(){ pragma(msg,typeid(int).toString); } ---- v2.063.2 Assertion failed: (thisval && thisval->op == TOKclassreference), function interpret, file interpret.c, line 4067. v2.062 Error: Cannot interpret & D10TypeInfo_i6__initZ at compile time & D10TypeInfo_i6__initZ.toString() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:44:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:44:30 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #4 from Kenji Hara 2013-07-08 19:44:29 PDT --- Incomplete compiler fix, and supplemental druntime change. https://github.com/D-Programming-Language/dmd/pull/2321 https://github.com/D-Programming-Language/druntime/pull/543 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:45:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:45:19 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #4 from Kenji Hara 2013-07-08 19:45:18 PDT --- *** This issue has been marked as a duplicate of issue 8435 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:45:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:45:21 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alvaro.segura at gmail.com --- Comment #8 from Kenji Hara 2013-07-08 19:45:18 PDT --- *** Issue 10118 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: ------- From d-bugmail at puremagic.com Mon Jul 8 19:46:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:46:05 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #9 from Kenji Hara 2013-07-08 19:46:02 PDT --- >From bug 10118: > Associative arrays with BigInts as keys are unusable: > > import std.bigint, std.stdio; > void main() > { > int[BigInt] a; > a[BigInt(3)] = 3; > a[BigInt(3)] = 4; > writeln(a); > } > > Prints: > > [3:3, 3:4] > > Apparently duplicate keys. > > Probably related to Issue 8435. > > I thought this was a consequence of Issue 3789 because BigInt is a struct > containing a string. But that was resolved recently, and this bug still appears > in 2.063 beta. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 19:57:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 02:57:28 +0000 (UTC) Subject: [Issue 7836] NaNs inside associative array don't use normal FP equality In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7836 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Windows |All --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-08 19:57:27 PDT --- Actually, this bug has nothing to do with AA's. The problem is that double's typeinfo.equals and typeinfo.compare does not respect NaNs: import std.stdio: writeln; void main() { double x = double.nan, y = double.nan; writeln(x == y); // prints false (OK) writeln(typeid(double).equals(&x, &y)); // prints true (WRONG) writeln(typeid(double).compare(&x, &y)); // prints 0 (WRONG) } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 20:10:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 03:10:40 +0000 (UTC) Subject: [Issue 8681] dmd accepts mutable AA key types for objects In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8681 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-08 20:10:39 PDT --- There's a case where accepting mutable keys may be OK: class C { immutable int x; int y, z; this() { ... /* initialize x */ } size_t toHash() const { // The "real" data is in x; y and z are used for, e.g., caching // or holding temporary values return typeid(int).getHash(x); } bool opEquals(const C c) const { return x == c.x; } } Since both toHash and opEquals only depend on C.x, it should be permissible to accept mutable C as AA key; the immutability of C.x guarantees we won't run into problems. The problem is, I don't think such a case is expressible in the current type system. (Though arguably, such cases are probably bad design and shouldn't be encouraged/catered to.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 20:48:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 03:48:30 +0000 (UTC) Subject: [Issue 10577] 2.063 Mixin Regression (works with 2.062) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10577 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #1 from Kenji Hara 2013-07-08 20:48:28 PDT --- https://github.com/D-Programming-Language/dmd/pull/2322 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 20:56:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 03:56:15 +0000 (UTC) Subject: [Issue 6850] BigInt opBinary is not marked as pure. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6850 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |hsteoh at quickfur.ath.cx Resolution| |WORKSFORME --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-08 20:56:15 PDT --- Seems to have been fixed in git HEAD. Please reopen if problem still occurs in latest release. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 21:52:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 04:52:35 +0000 (UTC) Subject: [Issue 9498] Range violation using AA In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9498 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |INVALID --- Comment #9 from Kenji Hara 2013-07-08 21:52:32 PDT --- The old behavior was wrong-code bug, and fixed in 2.061. Introduced commit/codeline: https://github.com/D-Programming-Language/dmd/commit/9553d0c66337b477375cb77743defcdd79b8064d#L4L3995 AA indexing + assign syntax is a special form in D. If the acquired payload from AA is _immediately_ set by assignment, it is treated as an insertion for non-existing key and won't throw RangeError. Otherwise, AA indexing should be always treated as a read of existing key - even if it is on Lvalue-context. I'd like to show more specific example. struct S { int value = 42; } S[string] myValues; ref S getValue(string v) { return myValues[v]; } void main() { import std.stdio; writeln(getValue("myValue").value); // what will be displayed? } In 2.060 and earlier, myValues[v] had returned a reference to *uninitialized* memory. From 2.061, it correctly throws RangeError. That's @safe behavior. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 22:21:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 05:21:30 +0000 (UTC) Subject: [Issue 10577] 2.063 Mixin Regression (works with 2.062) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10577 --- Comment #2 from Puneet Goel 2013-07-08 22:21:29 PDT --- Thanks Kenji. Tried your pull request in my code. Works for me too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 22:31:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 05:31:20 +0000 (UTC) Subject: [Issue 10481] out of memory error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10481 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull --- Comment #2 from Kenji Hara 2013-07-08 22:31:18 PDT --- https://github.com/D-Programming-Language/dmd/pull/2323 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 22:48:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 05:48:05 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #14 from github-bugzilla at puremagic.com 2013-07-08 22:48:03 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e1504f70b8cfdf4cd1082408fe2452a71e299ab3 Merge pull request #1403 from WebDrake/xorshift Fix Issue 10550 - Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 22:51:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 05:51:18 +0000 (UTC) Subject: [Issue 10580] New: spawnShell/pipeShell changes some environment variables (incl. PATH) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10580 Summary: spawnShell/pipeShell changes some environment variables (incl. PATH) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-08 22:51:17 PDT --- ----main.d: import std.process; import std.stdio; void main(){ writeln(environment["PATH"]); system("echo $PATH"); spawnShell("echo $PATH").wait; spawnShell("echo $0").wait; } ---- (on OSX if that matters, and I've set my shell to zsh but this isn't the problem) export PATH=/usr/bin path/to/dmd -run path/to/main.d #this prints: /usr/bin /usr/bin /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:... (+ other stuff) /go/bin /bin/zsh The bug is that spawnShell("echo $PATH") should IMO return the same as system("echo $PATH"). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 22:57:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 05:57:48 +0000 (UTC) Subject: [Issue 9097] Value range propagation to disable some array bound tests In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9097 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-08 22:57:46 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/186acf411866c1950b215f58fd57c08e903f588c Fix Issue 9097 - Value range propagation to disable some array bound tests Do not emit bounds check code if the index is statically known to be within bounds https://github.com/D-Programming-Language/dmd/commit/fe9bb4aaad8b9aa132bd86d7a1168be12fec5981 Merge pull request #1493 from yebblies/issue9097 Fix Issue 9097 - Value range propagation to disable some array bound tests -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 22:58:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 05:58:53 +0000 (UTC) Subject: [Issue 9097] Value range propagation to disable some array bound tests In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9097 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 23:20:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 06:20:19 +0000 (UTC) Subject: [Issue 10573] Weird linking problem with associative array cast [DMD 2.63] In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10573 --- Comment #3 from Daniel Kozak 2013-07-08 23:20:16 PDT --- (In reply to comment #2) > Btw, I'd be very careful using casts on hashes like that, there's no runtime > checking when you cast hashes, even if the key or value is a base class which > is casted to a derived class. For example: > > ----- > class A { } > class B : A { void call() { } } > > void main() > { > A[int] a; > a[1] = new A(); > > B[int] b = cast(B[int])a; // unsafe, no exceptions thrown > b[1].call(); // crash > } > ----- Yes, I realize I can avoid this kind of cast in my case, so now the code is more safe and compilable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 23:42:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 06:42:00 +0000 (UTC) Subject: [Issue 10580] spawnShell/pipeShell changes some environment variables (incl. PATH) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10580 --- Comment #1 from thelastmammoth at gmail.com 2013-07-08 23:41:59 PDT --- it also changes these (at least on OSX): MANPATH SHLVL ( this one is normal though) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 23:43:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 06:43:37 +0000 (UTC) Subject: [Issue 10580] spawnShell/pipeShell changes some environment variables (incl. PATH) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10580 --- Comment #2 from thelastmammoth at gmail.com 2013-07-08 23:43:37 PDT --- furthermore the output of command env is returned in a different order -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 8 23:49:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 06:49:35 +0000 (UTC) Subject: [Issue 10380] Wrong code using associative array as key type in associative array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10380 --- Comment #4 from Denis Shelomovskij 2013-07-09 10:49:34 MSD --- (In reply to comment #3) > Do you have any failing unittest for this bug? I can't seem to reproduce the > problem in git HEAD. It's hard to create unittests as the problem will appear iff we will have to unequal AA-s with equal hashes. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 00:40:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 07:40:51 +0000 (UTC) Subject: [Issue 10481] out of memory error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10481 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-09 00:40:49 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1365ebdc3c9176229513d2a5a30bf20c2dc50e37 fix Issue 10481 - out of memory error https://github.com/D-Programming-Language/dmd/commit/5378ea8f2c19abe7643418bf15401e617d6a1bcd Merge pull request #2323 from 9rnsr/fix10481 [REG2.063] Issue 10481 - out of memory error -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 00:40:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 07:40:56 +0000 (UTC) Subject: [Issue 10481] out of memory error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10481 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 00:45:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 07:45:15 +0000 (UTC) Subject: [Issue 10579] regression 062=>063: Cannot interpret TypeInfo at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10579 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |CTFE, ice, pull --- Comment #1 from Don 2013-07-09 00:45:14 PDT --- https://github.com/D-Programming-Language/dmd/pull/2325 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 01:05:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 08:05:00 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 --- Comment #15 from Joseph Rushton Wakeling 2013-07-09 01:04:56 PDT --- Masahiro -- thanks so much for your fast attention to this. :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 01:10:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 08:10:11 +0000 (UTC) Subject: [Issue 10579] regression 062=>063: Cannot interpret TypeInfo at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10579 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-09 01:10:06 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7f50fb0014544d5174f767d5a57c78cd747bded9 Fix bug 10579 CTFE ICE with TypeInfo Applies to any attempt to call a virtual function on a static variable. https://github.com/D-Programming-Language/dmd/commit/25db2c93a5fc94899cc9632e64aa3348f7ee2442 Bug 10579 CTFE ICE second case ICE when resolving a virtual function call in CTFE. Same ICE as bug 10579. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 01:10:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 08:10:39 +0000 (UTC) Subject: [Issue 10579] regression 062=>063: Cannot interpret TypeInfo at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10579 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 02:00:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 09:00:51 +0000 (UTC) Subject: [Issue 9982] ICE on CTFE for pointer dereference In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9982 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Version|D2 |D1 & D2 Severity|normal |critical --- Comment #2 from Don 2013-07-09 02:00:27 PDT --- This is a critical bug. Assignment via a pointer to a struct member does not work! struct Bug9982 { int a; } int test9982() { Bug9982 x; int *q = &x.a; *q = 99; assert(x.a == 99); return 1; } static assert(test9982()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 02:47:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 09:47:56 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-09 02:47:53 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/607c25a22d8d72f2d7fb5f81c861c7e54534101e Supplemental fix for issue 10567 Add helper function in druntime, same as opEquals case. https://github.com/D-Programming-Language/druntime/commit/d46b4eb096c2246c59a161a1d4e5494b38d784d0 Merge pull request #543 from 9rnsr/fix10567 Supplemental fix for issue 10567 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 03:15:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 10:15:13 +0000 (UTC) Subject: [Issue 9097] Value range propagation to disable some array bound tests In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9097 --- Comment #3 from bearophile_hugs at eml.cc 2013-07-09 03:15:11 PDT --- In past dmd generated this with "dmd -O -inline -release -noboundscheck": __Dmain: sub ESP, 0330h mov ECX, 0C8h push EDI mov EAX, 0338h[ESP] add EAX, 01770h mov 4[ESP], EAX xor EAX, EAX lea EDI, 014h[ESP] rep stosd mov EAX, 4[ESP] mov ECX, 064h xor EDX, EDX div ECX xor EAX, EAX mov dword ptr 014h[EDX*4][ESP], 1 pop EDI add ESP, 0330h ret Now it generates this in both the optimized build and the less optimized build "dmd -O -inline" (beside removing the array bound tests, it also avoids the "div"): __Dmain: sub ESP, 0324h mov ECX, 0C8h push EDI mov EAX, 032Ch[ESP] add EAX, 01770h mov 0324h[ESP], EAX xor EAX, EAX lea EDI, 4[ESP] rep stosd mov ECX, 0324h[ESP] mov EAX, ECX mov EDX, 051EB851Fh mul EDX shr EDX, 5 imul EAX, EDX, 064h sub ECX, EAX xor EAX, EAX mov dword ptr 4[ECX*4][ESP], 1 pop EDI add ESP, 0324h ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 03:56:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 10:56:37 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 --- Comment #4 from monarchdodra at gmail.com 2013-07-09 03:56:35 PDT --- (In reply to comment #3) > (In reply to comment #2) > > Just an educated guess. The problem seems to be that the value is a L-value so > > the signature becomes (ref T[]) which cannot match immutable(int[]). > > That's exactly the current compiler's behavior. "auto ref" always behave as > "ref" parameter against lvalue argument `i`, then T[] cannot deduce type T from > immutable(int[]). More generally, it seems auto ref will never operate a cast on an lvalue *even if* the parameter is not templatized. This is strange because auto ref *will* do it for RValues. Here is another (reduced) example that shows it. //---- void foo()(auto ref long a); void main() { int get(); int a; foo(get()); //Fine, rvalue int is cast to long foo(a); //Nope! } //---- main.d(7): Error: template main.foo does not match any function template declaration. Candidates are: main.d(1): main.foo()(auto ref long a) main.d(7): Error: template main.foo()(auto ref long a) cannot deduce template function from argument types !()(int) //---- I also spotted this (which, IMO, is even more problematic): //---- struct S { @property long get(); alias get this; } void foo()(auto ref long a); void main() { S s; foo(S()); //Fine. foo(s); //Nope! } //---- This time, it gives the "cryptic" error: main.d(14): Error: s.get() is not an lvalue => But that's strange: foo takes by auto ref... what do I care about lvalue? Because s is an Lvalue, it would appear the auto ref is "primed" to take by ref. It then fails when an actual Rvalue is given. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 05:58:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 12:58:41 +0000 (UTC) Subject: [Issue 10577] 2.063 Mixin Regression (works with 2.062) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10577 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-09 05:58:39 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/51991f94be53375fe66339d46eea343cd8a107a6 fix Issue 10577 - 2.063 Mixin Regression (works with 2.062) https://github.com/D-Programming-Language/dmd/commit/af61ebff5404dd408b1b40ef94e17fb585c1a7b6 Merge pull request #2322 from 9rnsr/fix10577 [REG2.063] Issue 10577 - 2.063 Mixin Regression (works with 2.062) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 06:44:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 13:44:22 +0000 (UTC) Subject: [Issue 10380] Wrong code using associative array as key type in associative array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10380 --- Comment #5 from hsteoh at quickfur.ath.cx 2013-07-09 06:44:21 PDT --- I have a fix for this, but I need to somehow make a unittest to verify that it actually fixes the problem. Maybe we can somehow craft a unittest using typeid(aa).compare? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 07:56:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 14:56:59 +0000 (UTC) Subject: [Issue 10380] Wrong code using associative array as key type in associative array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10380 --- Comment #6 from hsteoh at quickfur.ath.cx 2013-07-09 07:56:57 PDT --- https://github.com/D-Programming-Language/druntime/pull/544 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 07:58:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 14:58:01 +0000 (UTC) Subject: [Issue 10380] Wrong code using associative array as key type in associative array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10380 --- Comment #7 from hsteoh at quickfur.ath.cx 2013-07-09 07:58:00 PDT --- I figured out a way to test for broken .compare: make an AA key type that overrides both opEquals and opCmp, and deliberately have wrong implementation for opCmp. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 08:42:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 15:42:35 +0000 (UTC) Subject: [Issue 10581] New: Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10581 Summary: Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: minor Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: monkeyworks12 at hotmail.com --- Comment #0 from monkeyworks12 at hotmail.com 2013-07-09 08:42:35 PDT --- import std.algorithm; import std.uni; void main() { //Compiles auto x = [" "].filter!(a => a.canFind!(not!isWhite)); ///.../std/functional.d(56): Error: undefined identifier isWhite auto y = [" "].filter!"a.canFind!(not!isWhite)"; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 08:55:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 15:55:10 +0000 (UTC) Subject: [Issue 7012] Pure vector operations In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7012 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-09 08:55:08 PDT --- On latest git HEAD, dmd gives: test.d(4): Error: Array operation a[] + b[] not implemented So at least the message is more helpful. But it's still not working yet. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 08:59:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 15:59:05 +0000 (UTC) Subject: [Issue 7013] Mutable interface for BigInts In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7013 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-09 08:59:04 PDT --- In latest git HEAD, the following works: import std.bigint; void main() { BigInt x = 123; BigInt y = 321; x += y; assert(x == 444); } Not sure what's happening under the hood, though. Is it making internal allocations? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 09:01:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 16:01:22 +0000 (UTC) Subject: [Issue 7010] Purity of map and filter In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7010 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |hsteoh at quickfur.ath.cx Resolution| |WORKSFORME --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-09 09:01:21 PDT --- This appears to have been fixed in git HEAD. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 09:05:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 16:05:23 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-09 09:05:22 PDT --- The implementation should probably go into std.bitmanip or core.bitop. What's the pattern that DMD recognizes for rotate instructions? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 09:46:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 16:46:07 +0000 (UTC) Subject: [Issue 10582] New: Programmed and Compiler generated symbols clash. Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10582 Summary: Programmed and Compiler generated symbols clash. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: ibuclaw at ubuntu.com --- Comment #0 from Iain Buclaw 2013-07-09 09:46:05 PDT --- This is more of a pathological case, but produces an unexpected error nonetheless. Ditto for any other type of compiler generated temporary symbol. struct Bug { ~this() { } int opApply(in int delegate(int i) dg) { return 0; } } void main() { int __sl5; int __sl6; foreach (i; Bug()) {} // Error: declaration __sl6 is already defined } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 09:57:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 16:57:37 +0000 (UTC) Subject: [Issue 7013] Mutable interface for BigInts In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7013 --- Comment #2 from bearophile_hugs at eml.cc 2013-07-09 09:57:35 PDT --- (In reply to comment #1) > In latest git HEAD, the following works: > > import std.bigint; > void main() { > BigInt x = 123; > BigInt y = 321; > x += y; > assert(x == 444); > } > > Not sure what's happening under the hood, though. Is it making internal > allocations? That code works, but it's not about what this enhancement request is about. When you perform x+=y; the data inside x probably doesn't change. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 09:59:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 16:59:00 +0000 (UTC) Subject: [Issue 7013] Mutable interface for BigInts In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7013 --- Comment #3 from bearophile_hugs at eml.cc 2013-07-09 09:58:59 PDT --- (In reply to comment #2) > When you perform x+=y; the data inside x probably doesn't change. I meant the original x. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 10:02:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 17:02:31 +0000 (UTC) Subject: [Issue 7012] Pure vector operations In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7012 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #2 from bearophile_hugs at eml.cc 2013-07-09 10:02:30 PDT --- This compiles: void main() pure nothrow { int[3] a = [1, 2, 2]; int[3] b = [10, 20, 20]; int[3] c = void; c[] = a[] + b[]; } The error message caused by this line of code is not related to purity: immutable int[3] c = a[] + b[]; So this is closed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 10:07:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 17:07:36 +0000 (UTC) Subject: [Issue 7013] Mutable interface for BigInts In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7013 --- Comment #4 from hsteoh at quickfur.ath.cx 2013-07-09 10:07:34 PDT --- You're right, I looked at the code for BigInt, every time you do +=, it allocates a new underlying buffer. That's pretty inefficient if you're using these operations in an inner loop. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 10:10:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 17:10:23 +0000 (UTC) Subject: [Issue 10581] Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10581 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jmdavisProg at gmx.com Resolution| |INVALID --- Comment #1 from Jonathan M Davis 2013-07-09 10:10:22 PDT --- Sorry, but that's not a bug. It's one of the major reasons that the newer lambda syntax was introduced. The string lambda syntax only works with stuff that's imported by std.functional, and there's no reason for std.functional to import std.uni other than making string lambdas work with std.uni, and we obviously can't make that work with everything, because we can't have std.functional importing everything. Also, while I don't particularly like it (as string lambdas are really nice for short stuff), Andrei and Walter seem to be in favor of phasing out string lambdas anyway. But you're really not saving much by using a string lambda here anyway, so in this particular case, I don't think that that's much of a loss. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 10:13:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 17:13:39 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #2 from bearophile_hugs at eml.cc 2013-07-09 10:13:38 PDT --- (In reply to comment #1) > What's the pattern that DMD recognizes for rotate instructions? Walter offers this example of recognizable rotation: void test236() { uint a; int shift; a = 7; shift = 1; int r; r = (a >> shift) | (a << (int.sizeof * 8 - shift)); assert(r == 0x8000_0003); r = (a << shift) | (a >> (int.sizeof * 8 - shift)); assert(a == 7); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 10:21:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 17:21:04 +0000 (UTC) Subject: [Issue 10583] New: DMD 2.063 dumps core with mixins involving __traits(getProtection, .. Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10583 Summary: DMD 2.063 dumps core with mixins involving __traits(getProtection, .. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: puneet at coverify.org --- Comment #0 from Puneet Goel 2013-07-09 10:21:03 PDT --- Here is the test code. On compiling I get: dmd: traits.c:288: virtual Expression* TraitsExp::semantic(Scope*): Assertion `protName' failed. Aborted (core dumped) Also note that if I uncomment line 37 and comment out line 36, dmd compiles the code smoothly. ///////////// Test Code starts here enum sync; // 1 // 2 public template get_sync(size_t I, A...) { // 3 static if(I == A.length) // 4 enum bool get_sync = false; // 5 else static if(is(A[I] == sync)) // 6 enum bool get_sync = true; // 7 else // 8 enum bool get_sync = get_sync!(I+1, A); // 9 } // 10 // 11 template add_sync(T, size_t ITER=0) { // 12 static if(ITER == (__traits(derivedMembers, T).length)) { // 13 enum string add_sync = ""; // 14 } else { // 15 enum string mem = __traits(derivedMembers, T)[ITER]; // 16 enum string add_sync = // 17 "mixin(add_sync!(get_sync!(0, __traits(getAttributes, " // 18 ~ mem ~ ")), __traits(getProtection, " // 19 ~ mem ~ "), \"" ~ mem ~ "\")); " ~ add_sync!(T, ITER+1); // 20 } // 21 } // 22 // 23 template add_sync(bool A, string P, string M) { // 24 static if(A) { // 25 enum string add_sync = " auto " ~ M[1..$] ~ // 26 "() {synchronized(this) return " ~ M ~ ";}"; // 27 } else { // 28 enum string add_sync = ""; // 29 } // 30 } // 31 // 32 class derived { // 33 mixin(add_sync!(derived)); // 34 @sync private bool _bar; // 35 void frop() {} // 36 // private void frop() {} // 37 } // 38 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 10:24:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 17:24:40 +0000 (UTC) Subject: [Issue 7013] Mutable interface for BigInts In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7013 --- Comment #5 from bearophile_hugs at eml.cc 2013-07-09 10:24:39 PDT --- (In reply to comment #4) > You're right, I looked at the code for BigInt, every time you do +=, it > allocates a new underlying buffer. That's pretty inefficient if you're using > these operations in an inner loop. On the other hand I think a mutable integer is not what most people expect, and it can cause some undesired side effects (and bugs). That's why I suggested to introduce a specific syntax that allows you to manage bigints as mutable buffers where max performance is needed, and keep their behavour clean on default. Generally I think it's better to perform tricky optimizations only on explicit request. Some possible alternative syntaxes: x.mutable += y; x.mulAcc(y); x.mutate!"+"(y); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 10:51:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 17:51:12 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #11 from Andrej Mitrovic 2013-07-09 10:51:10 PDT --- (In reply to comment #10) > (In reply to comment #8) > > I don't test std.signal2 module, but the two test cases work with my patch. > > > > https://github.com/D-Programming-Language/dmd/pull/1660 > > std.signal2 works too! Thank you! @jfanatiker at gmx.at: I've tried your std.signals by compiling with 'dmd -c -o- -unittest signals.d' (the unittest switch is important here), specifically I've tried two commits for signals2: 04c951e34623e9365a3874c89f43eb997a7b376c (dav1d told me you said this might work) 4f7aaba0135bdfebfe54cbd645ca3652b0b0eb7a (git-head) I've tried them both with the current state of Pull 1660, but compilation fails due to those mixin conflicts. Can you verify this? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:16:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:16:33 +0000 (UTC) Subject: [Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10550 Joseph Rushton Wakeling changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #16 from Joseph Rushton Wakeling 2013-07-09 11:16:30 PDT --- I think we can now close the bug, but I will try and follow up with some people expert in RNG design to see if we can confirm the fixes really are correct. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:21:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:21:07 +0000 (UTC) Subject: [Issue 10584] New: Unhelpful error default constructing nested class Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10584 Summary: Unhelpful error default constructing nested class Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: peter.alexander.au at gmail.com --- Comment #0 from Peter Alexander 2013-07-09 11:21:07 PDT --- class A { class B {} B b = new B(); } Error: 'this' is only defined in non-static member functions, not A. This error isn't particularly helpful, since I don't explicitly request this. The error should state that constructing B requires a this reference, which isn't available for default construction. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:21:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:21:21 +0000 (UTC) Subject: [Issue 10585] New: Structs in unittest / functions shouldn't have frame pointer unless necessary Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10585 Summary: Structs in unittest / functions shouldn't have frame pointer unless necessary Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: hsteoh at quickfur.ath.cx --- Comment #0 from hsteoh at quickfur.ath.cx 2013-07-09 11:21:21 PDT --- CODE: ------snip------ import std.stdio; void listMembers(T)() { writefln("Size of %s is %d", T.stringof, T.sizeof); foreach (field; __traits(allMembers, T)) { writefln("\t%s", field); } } void main() { int y=1; struct S1 { int x; } static struct S2 { int x; bool opEquals() { return true; } } struct S3 { int x; bool opEquals() { return true; } } struct S4 { int x; bool opEquals() { return y==1; } } listMembers!S1(); listMembers!S2(); listMembers!S3(); listMembers!S4(); } ------snip------ OUTPUT: ------snip------ Size of S1 is 4 x Size of S2 is 4 x opEquals Size of S3 is 16 x opEquals this Size of S4 is 16 x opEquals this ------snip------ S3 is identical to S2 (except for the 'static' qualifier); DMD should not insert the frame pointer since it's not needed. According to TDPL, the frame pointer is only inserted where needed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:31:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:31:59 +0000 (UTC) Subject: [Issue 10586] New: DMD unable to interpret cascaded template calls at compile time Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10586 Summary: DMD unable to interpret cascaded template calls at compile time Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: puneet at coverify.org --- Comment #0 from Puneet Goel 2013-07-09 11:31:58 PDT --- I am using latest github dmd -- 712c3e256b1198523bb8a5c49e5e08d3f8409855 Here is the minimized code for the regression. $ dmd -c bvec.d foo.d(12): Error: Cannot interpret FooSize!N at compile time foo.d(13): while evaluating SIZE.init foo.d(13): while looking for match for FooParams!(1LU) foo.d(9): Error: template instance foo.foo!1 error instantiating I think the regression got introduced while fixing 10579. // Regression Code starts here private template FooParams(size_t SIZE) { private alias ubyte StoreT; } template FooSize(size_t N=1) { enum size_t FooSize = N; } enum foo!1 BIT_0 = foo!1.init; struct foo(size_t N) { enum size_t SIZE = FooSize!N; private alias FooParams!(SIZE).StoreT store_t; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:38:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:38:25 +0000 (UTC) Subject: [Issue 9455] File.isBinaryMode and more In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9455 Kevin L changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kevin.lamonte at gmail.com --- Comment #1 from Kevin L 2013-07-09 11:38:23 PDT --- (In reply to comment #0) > - Add isBinaryMode/isWriteable/isReadable properties to File, and implement > them as light wrappers around platform-specific functions that get that > information. I vote that there be five new functions: * isReadable(inout(C)[] path) (or perhaps canRead()): for files, a std.stdio.open(..., "r") will succeed; for directories, std.file.dirEntries() will succeed. * isWriteable(inout(C)[] path) (or perhaps canWrite()): for files, a std.stdio.open(..., "w") will succeed; for directories, creating a new file in the directory will succeed (excluding things like no space on device). Open question if this function should detect write-only media and return false if so. * isExecutable(inout(C)[] path) (or perhaps canExecute()): for files, exec()/fork()/popen()/etc. (and wrappers) will succeed; always false for directories. * isTraversable(inout(C)[] path): always false for files; for directories, a chdir() will succeed OR a file in the directory can be stat()d. (This is the traditional POSIX view of execute bit on a directory.) * std.stdio.File.isBinary(): returns true if the file was opened with "rb" or "wb". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:38:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:38:30 +0000 (UTC) Subject: [Issue 10587] New: __traits(getAttributes) doesn't work on incomplete templated types Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10587 Summary: __traits(getAttributes) doesn't work on incomplete templated types Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: qaston at gmail.com --- Comment #0 from QAston 2013-07-09 11:38:30 PDT --- Minimized case: enum Attribute; @Attribute class MyTemplate(T) { } @Attribute class MyType { } pragma(msg, __traits(getAttributes, MyTemplate)); // prints: tuple() pragma(msg, __traits(getAttributes, MyTemplate!uint)); // prints: tuple((Attribute)) pragma(msg, __traits(getAttributes, MyType)); // prints: tuple((Attribute)) I think it either result should be the same for non-instantiated type as for instantiated or pragma(msg, __traits(getAttributes, MyTemplate)) should yeld a compile time error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:44:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:44:38 +0000 (UTC) Subject: [Issue 10577] 2.063 Mixin Regression (works with 2.062) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10577 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |hsteoh at quickfur.ath.cx Resolution| |WORKSFORME --- Comment #4 from hsteoh at quickfur.ath.cx 2013-07-09 11:44:36 PDT --- Seems to have been fixed by the pull. I can compile the code without errors. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 11:57:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 18:57:16 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 --- Comment #12 from jfanatiker at gmx.at 2013-07-09 11:57:15 PDT --- > I've tried them both with the current state of Pull 1660, but compilation fails > due to those mixin conflicts. Can you verify this? HEAD definitely won't work at all. The older commit used to work for me, but pull 1660 changed quite significantly since then. Seeing that there is real use of my implementation I'm shifting it up in my priority list, prepare to see some commits in the next days. I will comment on pull 1660 if I find any issues. Best regards, Robert -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 12:06:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 19:06:59 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-09 12:06:57 PDT --- Hmph. That doesn't work. Compiling without -O just makes DMD translate it literally into shl/shr followed by or. Compiling with -O computes the values via CTFE, so I changed the code by making a and shift parameters, but DMD still uses shl/shr followed by or, instead of replacing it with rol/ror, as claimed. So basically, the pattern either isn't there, or isn't working properly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 12:16:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 19:16:45 +0000 (UTC) Subject: [Issue 10551] [CTFE] Wrong-code on passing dereferenced array pointer by ref 2 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10551 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-09 12:16:34 PDT --- https://github.com/D-Programming-Language/dmd/pull/2324 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 12:20:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 19:20:17 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #4 from hsteoh at quickfur.ath.cx 2013-07-09 12:20:16 PDT --- In fact, not even gdc -O3 recognizes this pattern. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 12:20:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 19:20:28 +0000 (UTC) Subject: [Issue 10552] Cannot apply access specifiers to individual anonymous enum members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10552 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 12:20:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 19:20:53 +0000 (UTC) Subject: [Issue 10552] Cannot apply access specifiers to individual anonymous enum members In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10552 --- Comment #5 from Walter Bright 2013-07-09 12:20:51 PDT --- Language changes are enhancements, not bug fixes. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 13:18:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 20:18:03 +0000 (UTC) Subject: [Issue 10491] Type inference for function arguments with default value In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10491 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #8 from Walter Bright 2013-07-09 13:17:59 PDT --- While I agree that this would be a nice enhancement, I'm with Kenji in worrying about ever more complex forward reference problems. I don't think it is worth the effort to overcome those problems at the moment, since as Kenji also pointed out, default arguments are not used often. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 13:48:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 20:48:32 +0000 (UTC) Subject: [Issue 10588] New: Typeinfo.compare uses bitwise comparison for structs Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10588 Summary: Typeinfo.compare uses bitwise comparison for structs Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: hsteoh at quickfur.ath.cx --- Comment #0 from hsteoh at quickfur.ath.cx 2013-07-09 13:48:31 PDT --- CODE: ------snip------ struct S { int[] data; } void main() { auto s = S([1,2,3]); auto t = S([1,2,3]); auto u = S([1,2,4]); assert(s == t); assert(s != u); assert(typeid(s).compare(&s, &t) == 0); // FAILS assert(typeid(s).compare(&s, &u) != 0); } ------snip------ Since S doesn't define opEquals or opCmp, the typeinfo's .compare is just the default provided by DMD. However, it uses bitwise comparison, whereas == uses field-wise comparison. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 13:56:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 20:56:41 +0000 (UTC) Subject: [Issue 10589] New: GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10589 Summary: GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size Product: D Version: unspecified Platform: All OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-09 13:56:40 PDT --- As the title explains, after a certain size (2048 for my 32 bit install on an 64 linux), the appendable data cannot be exploited anymore: //-------- import std.stdio; import core.memory; void main() { for ( size_t i = 4 ; i < 1_000_000 ; i *= 1.4 ) { ubyte[] s; s.reserve(i); writefln("%6s: s.capacity is %6s", i, s.capacity); assert(s.capacity >= i); auto p = s.ptr; auto s2 = p[0 .. 0]; writefln("%6s: s2.capacity is %6s", i, s2.capacity); assert(s2.capacity >= i); } for ( size_t i = 4 ; i < 1_000_000 ; i *= 1.4 ) { ubyte* p = cast(ubyte*)GC.malloc(i, GC.BlkAttr.APPENDABLE); ubyte[] s = p[0 .. 0]; writefln("%6s: s.capacity is %6s", i, s.capacity); assert(s.capacity + 4 >= i); //This ends up failing. } } //-------- 439521: s.capacity is 442351 439521: s2.capacity is 442351 615329: s.capacity is 618479 615329: s2.capacity is 618479 861460: s.capacity is 864239 861460: s2.capacity is 864239 4: p.capacity is 15 5: p.capacity is 15 6: p.capacity is 15 8: p.capacity is 15 ... 1443: p.capacity is 2046 2020: p.capacity is 2046 2827: p.capacity is 0 core.exception.AssertError at main(24): Assertion failure //-------- I find this strange, because the first test shows that the allocation size should not be a barrier. Is the APPENDABLE data miss-placed or something? I can't really make sense of why there would be a different behaviour between "s2" or "p" ... ? This is problematic, as "malloc(APPENDABLE)" is the only way to allocate a "true" d slice manually. Without this, functions such as array or appender, will return arrays that will relocate after the very first append :( -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 15:29:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 22:29:05 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 --- Comment #13 from Andrej Mitrovic 2013-07-09 15:29:03 PDT --- (In reply to comment #12) > > I've tried them both with the current state of Pull 1660, but compilation fails > > due to those mixin conflicts. Can you verify this? > > HEAD definitely won't work at all. The older commit used to work for me, but > pull 1660 changed quite significantly since then. Seeing that there is real use > of my implementation I'm shifting it up in my priority list, prepare to see > some commits in the next days. I will comment on pull 1660 if I find any > issues. > > Best regards, > Robert Btw why are you using mixin templates instead of a struct? I know the current std.signals uses it, but it's broken because people keep running into Issue 5028. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 15:29:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 9 Jul 2013 22:29:36 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 --- Comment #14 from Andrej Mitrovic 2013-07-09 15:29:34 PDT --- (In reply to comment #13) > Issue 5028. Link: http://d.puremagic.com/issues/show_bug.cgi?id=5028 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 20:01:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 03:01:07 +0000 (UTC) Subject: [Issue 10590] New: multiple definitions incorrectly allowed Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10590 Summary: multiple definitions incorrectly allowed Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-09 20:01:06 PDT --- ----main.d: int fun() {return 1;} int fun() {return 2;} void main(){} ---- dmd -run main.d this compiles, but shouldn't (compile error only occurs when referring to fun) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 20:19:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 03:19:04 +0000 (UTC) Subject: [Issue 10591] New: Error: only one main allowed doesn't show location of conflicting main symbols Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10591 Summary: Error: only one main allowed doesn't show location of conflicting main symbols Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-09 20:19:02 PDT --- ---a.d void main(){} --- ---b.d void main(){} --- ---main.d import a,b; --- rdmd main.d (or dmd main.d a.d b.d) =>b.d(1): Error: only one main allowed the error message should show: b.d(1): Error: only one main allowed (previously defined in a.d(1)) In more complex cases (with auto generated code or mixins etc), it can be hard to trace down location of such main symbols, so compiler should show that. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 20:24:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 03:24:24 +0000 (UTC) Subject: [Issue 10591] Error: only one main allowed doesn't show location of conflicting main symbols In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10591 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #1 from Andrej Mitrovic 2013-07-09 20:24:22 PDT --- I guess I should have been more persistent about error messages: https://github.com/D-Programming-Language/dmd/pull/1753#discussion_r3403264 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 20:27:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 03:27:35 +0000 (UTC) Subject: [Issue 4841] -inline wrecks certain nested structs causing error "*** is a nested function and cannot be accessed from ***" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4841 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #18 from Kenji Hara 2013-07-09 20:27:33 PDT --- https://github.com/D-Programming-Language/dmd/pull/2329 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 21:49:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 04:49:42 +0000 (UTC) Subject: [Issue 10590] multiple definitions incorrectly allowed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10590 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim at maxim-fomin.ru --- Comment #1 from Maxim Fomin 2013-07-09 21:49:40 PDT --- I am sure this is a dup of some issue but cannot find it right now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 22:43:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 05:43:29 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 --- Comment #15 from jfanatiker at gmx.at 2013-07-09 22:43:28 PDT --- > Btw why are you using mixin templates instead of a struct? I know the current > std.signals uses it, but it's broken because people keep running into Issue > 5028. Instead is not quite correct, the mixin is just a wrapper around the FullSignal struct. Reasoning: So only containing object can emit signals. (emit is made private) It is just a convenience wrapper which implements a good default behaviour in just one line of code. (Make emit private) Otherwise you would have to instantiate a FullSignal as private and manually provide methods for accessing the RestrictedSignal for making connections. Not too much work, but a little annoying. You can of course use the struct directly if you want. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 23:26:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 06:26:09 +0000 (UTC) Subject: [Issue 8667] selective import breaks normal overload resolution In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8667 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Kenji Hara 2013-07-09 23:26:07 PDT --- https://github.com/D-Programming-Language/dmd/pull/2256 I finally concluded that the current selective import behavior is not good. Then I fixed this issue in the pull request, but it's a breaking change. Dmitry, could you please comment your opinion in github discussion? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 23:36:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 06:36:32 +0000 (UTC) Subject: [Issue 9578] "is a nested function and cannot be accessed from" problem In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9578 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-09 23:36:31 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/98a398b704001b0bb1fd0259e5687dab11e88cce fix Issue 9578 - "is a nested function and cannot be accessed from" problem https://github.com/D-Programming-Language/dmd/commit/e66cc8f5787154bc0225246e2c49c84842727d05 Merge pull request #2330 from 9rnsr/fix9578 Issue 9578 - "is a nested function and cannot be accessed from" problem -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 9 23:36:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 06:36:45 +0000 (UTC) Subject: [Issue 9578] "is a nested function and cannot be accessed from" problem In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9578 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 01:40:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 08:40:52 +0000 (UTC) Subject: [Issue 10586] DMD unable to interpret cascaded template calls at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10586 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice --- Comment #1 from Don 2013-07-10 01:40:50 PDT --- (In reply to comment #0) > I think the regression got introduced while fixing 10579. No, that's unrelated. This isn't a CTFE bug, it's a bug in enums. Semantic has not yet been run on the enum initializer. My guess is that this is a forward reference issue. If you change it: struct foo(size_t N) { - enum size_t SIZE = FooSize!N; + enum size_t SIZE = 0 + FooSize!N; then you get a segfault, because the type is still NULL. My guess is that this was exposed by my "do const-folding in CTFE" patch. Previously these kinds of errors went undetected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 02:12:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 09:12:00 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #5 from bearophile_hugs at eml.cc 2013-07-10 02:11:50 PDT --- I think this should be a recognizable rotate left function: private static uint rol(in uint x, in uint y) pure nothrow { return (x << y) | (x >> (32 - y)); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 02:38:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 09:38:43 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw at ubuntu.com --- Comment #6 from Iain Buclaw 2013-07-10 02:38:38 PDT --- (In reply to comment #5) > I think this should be a recognizable rotate left function: > > private static uint rol(in uint x, in uint y) pure nothrow { > return (x << y) | (x >> (32 - y)); > } It is (in gdc with -O :) _D3rol3rolFNaNbxkxkZk: mov x, %eax mov y, %ecx rol %cl, %eax ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 02:50:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 09:50:20 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #7 from Iain Buclaw 2013-07-10 02:50:07 PDT --- (In reply to comment #5) > I think this should be a recognizable rotate left function: > > private static uint rol(in uint x, in uint y) pure nothrow { > return (x << y) | (x >> (32 - y)); > } And likewise for rotate right function: uint ror (in uint x, in uint y) pure nothrow { return (x >> y) | (x << (32 - y)); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 02:54:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 09:54:16 +0000 (UTC) Subject: [Issue 10586] DMD unable to interpret cascaded template calls at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10586 --- Comment #2 from Don 2013-07-10 02:54:12 PDT --- Further reduced shows I'm wrong about it being enums: ------------ template FooParams(size_t K) { alias int X; } struct foo { static const int SIZE = int.sizeof; alias FooParams!(SIZE).X Y; } ----------- bug.d(6): Error: Cannot interpret int at compile time bug.d(7): while evaluating SIZE.init bug.d(7): while looking for match for FooParams!(4) --- A very difficult related case is this one: const int Z = baz(3); const int W = baz(2); int baz(int k) { if (k == 3) return W; return 6; } static assert(Z == 6); because it means that baz cannot be JIT-compiled. Arguably this is a circular reference. It would be much simpler and would give better performance if we disallowed pseudo-circular refs. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 02:58:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 09:58:06 +0000 (UTC) Subject: [Issue 10064] opDollar called on garbage In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10064 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Kenji Hara 2013-07-10 02:58:03 PDT --- https://github.com/D-Programming-Language/dmd/pull/2331 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 03:21:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 10:21:19 +0000 (UTC) Subject: [Issue 10592] New: Regression of overloaded template function Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10592 Summary: Regression of overloaded template function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: zan77137 at nifty.com --- Comment #0 from SHOO 2013-07-10 03:21:17 PDT --- This code doesn't work in dmd git head master: -------------- struct A(E) { void put()(const(E)[] data) { pragma(msg, "hit 1"); } void put()(const(dchar)[] data) if (!is(E == dchar)) { pragma(msg, "hit 2"); } void put(C)(const(C)[] data) if (!is(C == dchar) && !is(E == C)) { pragma(msg, "hit 3"); } } void main() { A!char x; x.put("abcde"c); // OK: hit 1 x.put("abcde"w); // NG: this should hit 3 x.put("abcde"d); // OK: hit 2 } --------- RESULT ----------- $ dmd -run main hit 1 hit 2 main.d(12): Error: template main.A!char.A.put does not match any function templa te declaration. Candidates are: main.d(3): main.A!char.A.put()(const(E)[] data) main.d(4): main.A!char.A.put()(const(dchar)[] data) if (!is(E == dchar)) main.d(5): main.A!char.A.put(C)(const(C)[] data) if (!is(C == dchar) && ! is(E == C)) main.d(12): Error: template main.A!char.A.put()(const(E)[] data) cannot deduce t emplate function from argument types !()(immutable(wchar)[]) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 03:28:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 10:28:21 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #8 from bearophile_hugs at eml.cc 2013-07-10 03:28:19 PDT --- (In reply to comment #6) > (In reply to comment #5) > > I think this should be a recognizable rotate left function: > > > > private static uint rol(in uint x, in uint y) pure nothrow { > > return (x << y) | (x >> (32 - y)); > > } > > It is (in gdc with -O :) > > _D3rol3rolFNaNbxkxkZk: > mov x, %eax > mov y, %ecx > rol %cl, %eax > ret Both dmd and ldc2 recognize the patterns: uint rol(in uint x, in uint y) pure nothrow { return (x << y) | (x >> (32 - y)); } uint ror(in uint x, in uint y) pure nothrow { return (x >> y) | (x << (32 - y)); } extern(C) uint rol2(in uint x, in uint y) pure nothrow { return (x << y) | (x >> (32 - y)); } void main() {} /* dmd -O _D5temp23rolFNaNbxkxkZk: push EAX mov EAX,8[ESP] mov ECX,[ESP] rol EAX,CL pop ECX ret 4 _D5temp23rorFNaNbxkxkZk: push EAX mov EAX,8[ESP] mov ECX,[ESP] ror EAX,CL pop ECX ret 4 _rol2 : mov EAX,4[ESP] mov ECX,8[ESP] rol EAX,CL ret ---------------- ldmd2 -O -output-s __D5temp23rolFNaNbxkxkZk: movl 4(%esp), %edx movb %al, %cl roll %cl, %edx movl %edx, %eax ret $4 __D5temp23rorFNaNbxkxkZk: movl 4(%esp), %edx movb %al, %cl rorl %cl, %edx movl %edx, %eax ret $4 _rol2: movb 8(%esp), %cl movl 4(%esp), %eax roll %cl, %eax ret */ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 03:45:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 10:45:33 +0000 (UTC) Subject: [Issue 10593] New: array's reserve/capacity go haywire if length has been changed prior Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10593 Summary: array's reserve/capacity go haywire if length has been changed prior Product: D Version: unspecified Platform: x86 OS/Version: Windows Status: NEW Severity: critical Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-10 03:45:32 PDT --- On a win32 install on win7 64. Array size must be bigger than 2047. Not sure who is failing here (reserve? capacity?) but there is a big discrepancy between the two. It may and/or may not also make subsequent appends fail, or behave erratically. My tests show capacity failing to report correctly. relocation being indeterminate (I know it is not determinate behavior, but there's stink in my tests), and reserve going out of control... This is my test program: //---- import std.array, std.stdio, core.memory; void main() { enum M = 2047; enum N = 4080; //Basic case, everything works correctly { ubyte[] a = new ubyte[](M); writefln("a.capacity before: %s", a.capacity); //4079 writefln("a.reserve(%s): %s", N, a.reserve(N)); //8175 writefln("a.reserve(%s): %s", N, a.reserve(N)); //8175 writefln("a.capacity after: %s", a.capacity); //8175 auto b = a; b.length = N; writefln("Relocation after append? %s", a.ptr !is b.ptr); //false } writeln(); { ubyte[] a = new ubyte[](M); a ~= 1; // <= This little bastard here >:( writefln("a.capacity before: %s", a.capacity); //4079 writefln("a.reserve(%s): %s", N, a.reserve(N)); //8175 writefln("a.capacity after: %s", a.capacity); //4079 !!! auto b = a; b.length = N; writefln("Relocation after append? %s", a.ptr !is b.ptr); //false } writeln(); { ubyte[] a; a.length = M; // <= This little bastard here >:( writefln("a.capacity before: %s", a.capacity); //4079 writefln("a.reserve(%s): %s", N, a.reserve(N)); //8175 writefln("a.capacity after: %s", a.capacity); //4079 !!! auto b = a; b.length = N; writefln("Relocation after append? %s", a.ptr !is b.ptr); //false } writeln(); { ubyte[] a; a.length = M; writefln("a.reserve(%s): %s", N, a.reserve(N)); //8175 writefln("a.reserve(%s): %s", N, a.reserve(N)); //12271 !!! writefln("a.reserve(%s): %s", N, a.reserve(N)); //16367 !!! writefln("a.reserve(%s): %s", N, a.reserve(N)); //20463 !!! writefln("a.capacity after: %s", a.capacity); //4079 !!! } writeln(); } //---- And corresponding output (!!! added manually). //---- a.capacity before: 4079 a.reserve(4080): 8175 a.reserve(4080): 8175 a.capacity after: 8175 Relocation after append? false a.capacity before: 4079 a.reserve(4080): 8175 a.capacity after: 4079 Relocation after append? false a.capacity before: 4079 a.reserve(4080): 8175 a.capacity after: 4079 Relocation after append? false a.reserve(4080): 8175 a.reserve(4080): 12271 a.reserve(4080): 16367 a.reserve(4080): 20463 a.capacity after: 4079 //---- To trigger, M must be at least as big as 2047, and N must be enough to require work. Marking as critical, as this is really a core feature of D, and *really* getting in the way of some of my array/appender fixes. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 03:49:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 10:49:51 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #9 from Iain Buclaw 2013-07-10 03:49:49 PDT --- (In reply to comment #8) > (In reply to comment #6) > > (In reply to comment #5) > > > I think this should be a recognizable rotate left function: > > > > > > private static uint rol(in uint x, in uint y) pure nothrow { > > > return (x << y) | (x >> (32 - y)); > > > } > > > > It is (in gdc with -O :) > > > > _D3rol3rolFNaNbxkxkZk: > > mov x, %eax > > mov y, %ecx > > rol %cl, %eax > > ret > > > Both dmd and ldc2 recognize the patterns: > Excellent, so could put these as templates then. :) T rol (T)(in T x, in uint y) pure nothrow { return cast(T)((x << y) | (x >> ((T.sizeof * 8) - y))); } T ror (T)(in T x, in uint y) pure nothrow { return cast(T)((x >> y) | (x << ((T.sizeof * 8) - y))); } // Tests to check for assembly output. extern ubyte xb; extern ushort xs; extern uint xi; extern ulong xl; extern uint yi; { rol (xb, yi); // rolb ror (xb, yi); // rorb rol (xs, yi); // rolw ror (xs, yi); // rorw rol (xi, yi); // roll ror (xi, yi); // rorl rol (xl, yi); // version(X86_64) rolq ror (xl, yi); // version(X86_64) rorq } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 04:15:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 11:15:18 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #10 from bearophile_hugs at eml.cc 2013-07-10 04:15:16 PDT --- (In reply to comment #9) > Excellent, so could put these as templates then. :) I have improved your code a little. Follows the 32 bit asm for ldc2 and dmd: import std.traits: isIntegral, isUnsigned; T rol(T)(in T x, in uint y) @safe pure nothrow if (isIntegral!T && isUnsigned!T) { return cast(T)((x << y) | (x >> ((T.sizeof * 8) - y))); } T ror(T)(in T x, in uint y) @safe pure nothrow if (isIntegral!T && isUnsigned!T) { return cast(T)((x >> y) | (x << ((T.sizeof * 8) - y))); } void main() { // Tests to check for assembly output. { __gshared static ubyte xb; __gshared static ushort xs; __gshared static uint xi; __gshared static ulong xl; __gshared static uint yi; rol(xb, yi); // rolb ror(xb, yi); // rorb rol(xs, yi); // rolw ror(xs, yi); // rorw rol(xi, yi); // roll ror(xi, yi); // rorl rol(xl, yi); // version(X86_64) rolq ror(xl, yi); // version(X86_64) rorq } } /* ldmd2 -O -output-s __D5temp210__T3rolThZ3rolFNaNbNfxhxkZh: pushl %esi movzbl 8(%esp), %edx movb %al, %cl movl %edx, %esi shll %cl, %esi movl $8, %ecx subl %eax, %ecx shrl %cl, %edx orl %esi, %edx movzbl %dl, %eax popl %esi ret $4 __D5temp210__T3rorThZ3rorFNaNbNfxhxkZh: pushl %esi movzbl 8(%esp), %edx movb %al, %cl movl %edx, %esi shrl %cl, %esi movl $8, %ecx subl %eax, %ecx shll %cl, %edx orl %esi, %edx movzbl %dl, %eax popl %esi ret $4 __D5temp210__T3rolTtZ3rolFNaNbNfxtxkZt: pushl %esi movzwl 8(%esp), %edx movb %al, %cl movl %edx, %esi shll %cl, %esi movl $16, %ecx subl %eax, %ecx shrl %cl, %edx orl %esi, %edx movzwl %dx, %eax popl %esi ret $4 __D5temp210__T3rorTtZ3rorFNaNbNfxtxkZt: pushl %esi movzwl 8(%esp), %edx movb %al, %cl movl %edx, %esi shrl %cl, %esi movl $16, %ecx subl %eax, %ecx shll %cl, %edx orl %esi, %edx movzwl %dx, %eax popl %esi ret $4 __D5temp210__T3rolTkZ3rolFNaNbNfxkxkZk: movl 4(%esp), %edx movb %al, %cl roll %cl, %edx movl %edx, %eax ret $4 __D5temp210__T3rorTkZ3rorFNaNbNfxkxkZk: movl 4(%esp), %edx movb %al, %cl rorl %cl, %edx movl %edx, %eax ret $4 __D5temp210__T3rolTmZ3rolFNaNbNfxmxkZm: pushl %ebp pushl %ebx pushl %edi pushl %esi movl %eax, %ebx movl $64, %ecx subl %ebx, %ecx movl 24(%esp), %edx movl 20(%esp), %eax movl %eax, %esi shrdl %cl, %edx, %esi movl %edx, %edi shrl %cl, %edi xorl %ebp, %ebp testb $32, %cl cmovnel %edi, %esi cmovnel %ebp, %edi movb %bl, %cl shldl %cl, %eax, %edx movb %bl, %cl shll %cl, %eax testb $32, %bl cmovnel %eax, %edx cmovnel %ebp, %eax orl %esi, %eax orl %edi, %edx popl %esi popl %edi popl %ebx popl %ebp ret $8 __D5temp210__T3rorTmZ3rorFNaNbNfxmxkZm: pushl %ebp pushl %ebx pushl %edi pushl %esi movl %eax, %ecx movl 24(%esp), %edx movl 20(%esp), %eax movl %eax, %esi shrdl %cl, %edx, %esi movl %edx, %edi shrl %cl, %edi xorl %ebp, %ebp testb $32, %cl cmovnel %edi, %esi cmovnel %ebp, %edi movl $64, %ebx subl %ecx, %ebx movb %bl, %cl shldl %cl, %eax, %edx movb %bl, %cl shll %cl, %eax testb $32, %bl cmovnel %eax, %edx cmovnel %ebp, %eax orl %esi, %eax orl %edi, %edx popl %esi popl %edi popl %ebx popl %ebp ret $8 -------------------------------- dmd -O _D5temp210__T3rolThZ3rolFNaNbNfxhxkZh: push EAX push EAX movzx ECX,byte ptr 0Ch[ESP] mov EAX,ECX mov 0[ESP],ECX mov CL,4[ESP] mov EDX,0[ESP] shl AL,CL mov ECX,8 sub ECX,4[ESP] sar EDX,CL add ESP,8 or AL,DL ret 4 _D5temp210__T3rorThZ3rorFNaNbNfxhxkZh: push EAX push EAX movzx ECX,byte ptr 0Ch[ESP] mov EAX,ECX mov 0[ESP],ECX mov ECX,8 sub CL,4[ESP] mov EDX,0[ESP] shl AL,CL mov ECX,4[ESP] sar EDX,CL add ESP,8 or AL,DL ret 4 _D5temp210__T3rolTtZ3rolFNaNbNfxtxkZt: push EAX mov AX,8[ESP] mov CX,[ESP] mov DX,8[ESP] shl EAX,CL mov ECX,010h sub ECX,[ESP] and EDX,0FFFFh sar EDX,CL pop ECX or EAX,EDX ret 4 _D5temp210__T3rorTtZ3rorFNaNbNfxtxkZt: push EAX mov ECX,010h mov AX,8[ESP] sub ECX,[ESP] mov DX,8[ESP] shl EAX,CL mov ECX,[ESP] and EDX,0FFFFh sar EDX,CL or EAX,EDX pop ECX ret 4 _D5temp210__T3rolTkZ3rolFNaNbNfxkxkZk: push EAX mov EAX,8[ESP] mov ECX,[ESP] rol EAX,CL pop ECX ret 4 _D5temp210__T3rorTkZ3rorFNaNbNfxkxkZk: push EAX mov EAX,8[ESP] mov ECX,[ESP] ror EAX,CL pop ECX ret 4 _D5temp210__T3rolTmZ3rolFNaNbNfxmxkZm: push EAX mov ECX,0[ESP] mov EDX,0Ch[ESP] push EBX mov EAX,0Ch[ESP] test CL,020h jne L1A shld EDX,EAX,CL shl EAX,CL jmp short L20 L1A: shl EAX,CL mov EDX,EAX xor EAX,EAX L20: mov ECX,040h mov EBX,0Ch[ESP] push EDX mov EDX,014h[ESP] sub ECX,8[ESP] test CL,020h jne L3E shrd EBX,EDX,CL shr EDX,CL jmp short L44 L3E: shr EDX,CL mov EBX,EDX xor EDX,EDX L44: mov ECX,EDX or EAX,EBX pop EDX or EDX,ECX pop EBX pop ECX ret 8 _D5temp210__T3rorTmZ3rorFNaNbNfxmxkZm: push EAX mov ECX,0[ESP] mov EDX,0Ch[ESP] push EBX mov EAX,0Ch[ESP] test CL,020h jne L1A shrd EAX,EDX,CL shr EDX,CL jmp short L20 L1A: shr EDX,CL mov EAX,EDX xor EDX,EDX L20: mov ECX,040h mov EBX,0Ch[ESP] push EDX mov EDX,014h[ESP] sub ECX,8[ESP] test CL,020h jne L3E shld EDX,EBX,CL shl EBX,CL jmp short L44 L3E: shl EBX,CL mov EDX,EBX xor EBX,EBX L44: mov ECX,EDX or EAX,EBX pop EDX or EDX,ECX pop EBX pop ECX ret 8 */ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 04:41:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 11:41:34 +0000 (UTC) Subject: [Issue 10594] New: Shaping the value range for immutable variables Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10594 Summary: Shaping the value range for immutable variables Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-10 04:41:33 PDT --- (This is an improvement for Issue 10018 , but it's sufficiently different, so I have opened a new issue.) Currently this fails: void main(in string[] args) { immutable ushort x = args.length % 5; immutable ubyte y = x; } dmd 2.064alpha gives: temp.d(3): Error: cannot implicitly convert expression (x) of type immutable(ushort) to immutable(ubyte) Issue 10018 asks to propagate the range of immutable values, allowing that code to compile with no errors. - - - - - - - - - - - This is an improvement of that idea: void main(in string[] args) { immutable size_t x = args.length; assert(x < 256); immutable ubyte y = x; } x is an immutable full-range size_t. But the assert should change the range of x, allowing the successive assignment of y to be accepted. - - - - - - - - - - - Another possible idea is to allow code like: void main(in string[] args) { immutable size_t x = args.length; if (x < 256) { immutable ubyte y = x; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 04:43:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 11:43:11 +0000 (UTC) Subject: [Issue 10018] Value range propagation for immutable variables In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10018 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #5 from bearophile_hugs at eml.cc 2013-07-10 04:43:10 PDT --- (In reply to comment #1) > https://github.com/D-Programming-Language/dmd/pull/1955 This is a good improvement for D. I hope you will fix and reopen your patch. But I think this issue should be tagged as "enhancement". See also Issue 10594 for an "improvement" of this idea. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 04:57:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 11:57:07 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #11 from Iain Buclaw 2013-07-10 04:57:05 PDT --- (In reply to comment #10) > (In reply to comment #9) > > > Excellent, so could put these as templates then. :) > > I have improved your code a little. Follows the 32 bit asm for ldc2 and dmd: > gdc > (ldc && dmd); It has no problem detecting all those cases. :o) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 05:05:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 12:05:15 +0000 (UTC) Subject: [Issue 10593] array's reserve/capacity go haywire if length has been changed prior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10593 --- Comment #1 from monarchdodra at gmail.com 2013-07-10 05:05:14 PDT --- Note: The same behavior happens with GC.extend too: extend will succeed, but the reported capacity will not be updated. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 06:11:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 13:11:09 +0000 (UTC) Subject: [Issue 10592] Regression of overloaded template function In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10592 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #1 from Kenji Hara 2013-07-10 06:11:08 PDT --- https://github.com/D-Programming-Language/dmd/pull/2332 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 06:45:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 13:45:06 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #12 from bearophile_hugs at eml.cc 2013-07-10 06:45:05 PDT --- A bit better, with a pre-condition to catch some bugs: T rol(T)(in T x, in uint n) @safe pure nothrow if (isIntegral!T && isUnsigned!T) in { assert(n < (T.sizeof * 8)); } body { return cast(T)((x << n) | (x >> ((T.sizeof * 8) - n))); } T ror(T)(in T x, in uint n) @safe pure nothrow if (isIntegral!T && isUnsigned!T) in { assert(n < (T.sizeof * 8)); } body { return cast(T)((x >> n) | (x << ((T.sizeof * 8) - n))); } -------------- (In reply to comment #11) > gdc > (ldc && dmd); > > It has no problem detecting all those cases. :o) But is that asm generated by gdc actually faster than this asm generated by ldc2? One of the main points of adding those two templated functions to core.bitop is to have a single common standard pair of rotations that all present and future D compilers can recognize and optimize well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 06:46:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 13:46:46 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #13 from bearophile_hugs at eml.cc 2013-07-10 06:46:44 PDT --- (In reply to comment #11) > It has no problem detecting all those cases. :o) Perhaps you want to show the asm generated by gdc for those functions? (Perhaps here there's material for a small enhancement request for LLVM.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 06:53:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 13:53:29 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #14 from Iain Buclaw 2013-07-10 06:53:27 PDT --- (In reply to comment #12) > (In reply to comment #11) > > > gdc > (ldc && dmd); > > > > It has no problem detecting all those cases. :o) > > But is that asm generated by gdc actually faster than this asm generated by > ldc2? > Well, I would have to assume that ro{lr}{bwlq} is faster than shl/shr. Someone should get speed reports in. =) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 06:55:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 13:55:10 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #15 from Iain Buclaw 2013-07-10 06:55:08 PDT --- (In reply to comment #13) > (In reply to comment #11) > > > It has no problem detecting all those cases. :o) > > Perhaps you want to show the asm generated by gdc for those functions? > > (Perhaps here there's material for a small enhancement request for LLVM.) You see the assembler output for roll/rorl. It's identical with exception to the operand suffix - eg: rolb/rorb for ubyte. But to give you a comparison. // LDC __D5temp210__T3rolThZ3rolFNaNbNfxhxkZh: pushl %esi movzbl 8(%esp), %edx movb %al, %cl movl %edx, %esi shll %cl, %esi movl $8, %ecx subl %eax, %ecx shrl %cl, %edx orl %esi, %edx movzbl %dl, %eax popl %esi ret $4 vs. // GDC __D5temp210__T3rolThZ3rolFNaNbNfxhxkZh: movl %edi, %eax movl %esi, %ecx rolb %cl, %al ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 06:59:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 13:59:39 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #16 from Iain Buclaw 2013-07-10 06:59:38 PDT --- (In reply to comment #13) > (In reply to comment #11) > > > It has no problem detecting all those cases. :o) > > Perhaps you want to show the asm generated by gdc for those functions? > > (Perhaps here there's material for a small enhancement request for LLVM.) Full listing: _D4temp10__T3rolThZ3rolFNaNbNfxhxkZh: movl %edi, %eax movl %esi, %ecx rolb %cl, %al ret _D4temp10__T3rorThZ3rorFNaNbNfxhxkZh: movl %edi, %eax movl %esi, %ecx rorb %cl, %al ret _D4temp10__T3rolTtZ3rolFNaNbNfxtxkZt: movl %edi, %eax movl %esi, %ecx rolw %cl, %ax ret _D4temp10__T3rorTtZ3rorFNaNbNfxtxkZt: movl %edi, %eax movl %esi, %ecx rorw %cl, %ax ret _D4temp10__T3rolTkZ3rolFNaNbNfxkxkZk: movl %edi, %eax movl %esi, %ecx roll %cl, %eax ret _D4temp10__T3rorTkZ3rorFNaNbNfxkxkZk: movl %edi, %eax movl %esi, %ecx rorl %cl, %eax ret _D4temp10__T3rolTmZ3rolFNaNbNfxmxkZm: movq %rdi, %rax movl %esi, %ecx rolq %cl, %rax ret _D4temp10__T3rorTmZ3rorFNaNbNfxmxkZm: movq %rdi, %rax movl %esi, %ecx rorq %cl, %rax ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 07:30:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 14:30:37 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 --- Comment #16 from Andrej Mitrovic 2013-07-10 07:30:35 PDT --- (In reply to comment #15) > > Btw why are you using mixin templates instead of a struct? I know the current > > std.signals uses it, but it's broken because people keep running into Issue > > 5028. > > Instead is not quite correct, the mixin is just a wrapper around the FullSignal > struct. Ah you mean 'RestrictedSignal', the other one has a private alias. Ok then. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 07:54:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 14:54:54 +0000 (UTC) Subject: [Issue 10595] New: Using alias this and a hash generates wrong code Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10595 Summary: Using alias this and a hash generates wrong code Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: critical Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-10 07:54:54 PDT --- ----- struct S { bool b = true; bool test() { if (!b) // note: must be a check, not 'return b;' return false; return true; } } struct Wrap { int i; alias i this; S s; } void main() { { Wrap[int] wrap; wrap[0] = Wrap(); wrap[0].i = 0; assert(wrap[0].s.test()); // ok } { Wrap[int] wrap; wrap[0] = Wrap(); wrap[0] = 0; // note: using 'alias this' to assign assert(wrap[0].s.test()); // failure } } ----- It doesn't appear to be a regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 08:17:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 15:17:00 +0000 (UTC) Subject: [Issue 10555] enumerator can no longer increment beyond maximum of initializer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10555 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #1 from Andrej Mitrovic 2013-07-10 08:16:59 PDT --- Well if anything, the recent enum fixes and subsequent regressions exposed that we have a really poor enum test-suite. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 08:29:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 15:29:38 +0000 (UTC) Subject: [Issue 8956] Ability to break typesystem with constructor/postblit/destructor (e.g. modify immutable) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8956 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |maxim at maxim-fomin.ru Resolution| |FIXED --- Comment #3 from Maxim Fomin 2013-07-10 08:29:36 PDT --- It was fixed in 2.063 (now ctor attributes should correspond to those in variable declarations). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 08:30:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 15:30:41 +0000 (UTC) Subject: [Issue 8977] Ability to break typesystem with static struct initializer (e.g. modify immutable) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8977 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |maxim at maxim-fomin.ru Resolution| |FIXED --- Comment #1 from Maxim Fomin 2013-07-10 08:30:41 PDT --- It was fixed in 2.063 release. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 08:49:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 15:49:14 +0000 (UTC) Subject: [Issue 10596] New: A method with out contract and auto return type causes segfault Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10596 Summary: A method with out contract and auto return type causes segfault Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: ttanjo at gmail.com --- Comment #0 from Tomoya Tanjo 2013-07-10 08:49:13 PDT --- The following code causes segfault with exit code 139 with dmd v2.064-devel-e66cc8f on Linux 64bit. --- foo.d class Foo { auto bar() out(result) { } body { return 0; } } --- $ dmd -run foo.d zsh: segmentation fault (core dumped) dmd -run foo.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 08:49:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 15:49:47 +0000 (UTC) Subject: [Issue 10597] New: opDollar not callable in static constext Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10597 Summary: opDollar not callable in static constext Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-10 08:49:46 PDT --- Discussed here: http://forum.dlang.org/thread/ddktjwsavfeiahblvrit at forum.dlang.org //---- struct R { void opIndex(int); int opDollar(); } R r; void foo() { static assert(is(typeof(r[0]))); //ok static assert(is(typeof(r[$]))); //ok } static assert(is(typeof(r[0]))); //ok static assert(is(typeof(r[$]))); //fails (!) struct S { void foo() { static assert(is(typeof(r[0]))); //ok static assert(is(typeof(r[$]))); //ok } static assert(is(typeof(r[0]))); //ok static assert(is(typeof(r[$]))); //fails (!) } //---- Calling opDollar in a "static context" fails. Apparently, it would appear that opDollar is looking for some sort of "this" or context pointer. If opDollar is defined as static, or enum, then the above code works. The error message is kind of weird too: main.d(15): Error: static assert (is(typeof(r.opIndex((int __dollar = r.opDollar(); , __dollar))))) is false -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 09:21:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 16:21:04 +0000 (UTC) Subject: [Issue 10590] multiple definitions incorrectly allowed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10590 --- Comment #2 from thelastmammoth at gmail.com 2013-07-10 09:21:02 PDT --- Are you sure? I couldn't find a similar issue (if anything the title should contain "multiple definitions"). Seems like an obvious bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 09:29:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 16:29:53 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #17 from bearophile_hugs at eml.cc 2013-07-10 09:29:51 PDT --- (In reply to comment #15) > But to give you a comparison. > > // LDC > > __D5temp210__T3rolThZ3rolFNaNbNfxhxkZh: > pushl %esi > movzbl 8(%esp), %edx > movb %al, %cl > movl %edx, %esi > shll %cl, %esi > movl $8, %ecx > subl %eax, %ecx > shrl %cl, %edx > orl %esi, %edx > movzbl %dl, %eax > popl %esi > ret $4 > > vs. > > // GDC > > __D5temp210__T3rolThZ3rolFNaNbNfxhxkZh: > movl %edi, %eax > movl %esi, %ecx > rolb %cl, %al > ret I have asked in the LLVM IRC channel, and it seems a limit/problem of the llvm back-end. So maybe it's worth writing an LLVM enhancement request. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 11:01:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 18:01:56 +0000 (UTC) Subject: [Issue 10198] CTFE: Wrong code for multi-dimensional block assignment In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10198 Andrei Alexandrescu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrei at erdani.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 11:14:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 18:14:35 +0000 (UTC) Subject: [Issue 10598] New: Using not-imported type - AssertFail: 'global.errors' line 6040 'template.c' Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10598 Summary: Using not-imported type - AssertFail: 'global.errors' line 6040 'template.c' Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: qaston at gmail.com --- Comment #0 from QAston 2013-07-10 11:14:33 PDT --- To trigger the assert we need 2 modules: module a.notimported; struct LocalType { } module a.app; import std.typetuple; alias TypeTuple!(__traits(getMember, a.notimported,(__traits(allMembers, a.notimported)[1])))[0] notImportedType; Modules have to create a hierarchy like this, at least it appears this way. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 12:00:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 19:00:27 +0000 (UTC) Subject: [Issue 10599] New: CTFE: assert failure interpret.c 310 Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10599 Summary: CTFE: assert failure interpret.c 310 Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: CTFE Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bugzilla at digitalmars.com --- Comment #0 from Walter Bright 2013-07-10 12:00:26 PDT --- The following: ---------------------------- struct Bug { int val = 3.45; } int bug() { Bug p = Bug(); return 1; } static assert(bug()); ----------------------------- causes: ice.d(4): Error: cannot implicitly convert expression (3.45) of type double to int CTFE: ErrorExp in ice.d(6) assert interpret.c(310) 0 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 12:03:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 19:03:59 +0000 (UTC) Subject: [Issue 10599] CTFE: assert failure interpret.c 310 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10599 --- Comment #1 from Walter Bright 2013-07-10 12:03:58 PDT --- This is currently blocking: https://github.com/D-Programming-Language/dmd/pull/2146 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 12:06:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 19:06:23 +0000 (UTC) Subject: [Issue 10591] Error: only one main allowed doesn't show location of conflicting main symbols In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10591 --- Comment #2 from thelastmammoth at gmail.com 2013-07-10 12:06:22 PDT --- you wrote there: >> But maybe it doesn't matter all that much, the user can do a global search to find the offending main function. That can be hard in practice (in my cases I auto-generate my main functions to add instrumentation code; or main could be in object file where we don't have source code etc). And user shouldn't have to do such global search when compiler knows this information. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 12:24:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 19:24:41 +0000 (UTC) Subject: [Issue 7538] All kinds of property functions should be called before getting their types inside typeof In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7538 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-10 12:24:41 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1093dbe73f2414f4c03706e99888e0764b42fa65 fix Issue 7538 - All kinds of property functions should be called before getting their types inside typeof https://github.com/D-Programming-Language/dmd/commit/88b60e77fa9dea5487ebaa019c325910193f34aa Merge pull request #2123 from 9rnsr/fix7538 Issue 7538 - All kinds of property functions should be called before getting their types inside typeof -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 12:24:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 19:24:58 +0000 (UTC) Subject: [Issue 7538] All kinds of property functions should be called before getting their types inside typeof In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7538 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 15:21:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 22:21:31 +0000 (UTC) Subject: [Issue 10600] New: regression(2.063.2) ICE: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10600 Summary: regression(2.063.2) ICE: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-10 15:21:30 PDT --- import std.typecons; void fun(){ import std.conv:to; auto a=to!int(""); auto b=to!(int,double)(""); auto c=tuple(1); } dmd -c main.d Error: template instance to!(int, double) does not match template declaration to(T) Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. zsh: abort dmd -c with 2.062: Error: template instance to!(int, double) to!(int, double) does not match template declaration to(T) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 16:42:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 10 Jul 2013 23:42:03 +0000 (UTC) Subject: [Issue 10601] New: std.path.setExtension leaves trailing dot if extension is empty Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10601 Summary: std.path.setExtension leaves trailing dot if extension is empty Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: hsteoh at quickfur.ath.cx --- Comment #0 from hsteoh at quickfur.ath.cx 2013-07-10 16:42:01 PDT --- Code: -----snip----- import std.path, std.stdio; void main() { version(Windows) string ext = ".exe"; version(Posix) string ext = ""; string srcfile = "program.d"; writeln(setExtension(srcfile, ext)); } -----snip----- Output on Posix is "program." (with the stray trailing dot). When an empty extension is given, setExtension should simply strip the extension. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 17:36:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 00:36:50 +0000 (UTC) Subject: [Issue 10602] New: Better error message for wrong template lambda given to function Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10602 Summary: Better error message for wrong template lambda given to function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-10 17:36:48 PDT --- This is wrong code: void foo(int function(int) f) {} void main() { foo(x => 0); // OK foo(x => 0.0); // Error foo((x, y) => 0); // Error } DMD 2.064alpha gives: test.d(4): Error: function test.foo (int function(int) f) is not callable using argument types (void) test.d(5): Error: function test.foo (int function(int) f) is not callable using argument types (void) I suggest to try to generate better error messages here, that better explain the problem to the programmer. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 17:39:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 00:39:32 +0000 (UTC) Subject: [Issue 10603] New: Refused pure attribute on the left for function pointer argument Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10603 Summary: Refused pure attribute on the left for function pointer argument Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-10 17:39:31 PDT --- void foo(int function(int) pure f1) {} // OK void bar(pure int function(int) f2) {} // error void main() { int function(int) pure f3; // OK pure int function(int) f4; // OK } DMD 2.064alpha gives: test.d(2): Error: basic type expected, not pure test.d(2): Error: found 'pure' when expecting ')' test.d(2): Error: semicolon expected following function declaration test.d(2): Error: semicolon expected, not ')' test.d(2): Error: Declaration expected, not ')' test.d(6): Error: unrecognized declaration -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 19:08:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 02:08:45 +0000 (UTC) Subject: [Issue 10604] New: Not consistent access check for overloaded symbols Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10604 Summary: Not consistent access check for overloaded symbols Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid, rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-10 19:08:40 PDT --- Test case: moduel a; version(A) { private template X(T) { enum X = 1; } public template X(size_t n) { enum X = 2; } private void foo(int) {} public void foo(string) {} } version(B) { public template X(size_t n) { enum X = 2; } private template X(T) { enum X = 1; } public void foo(string) {} private void foo(int) {} } module b; import a; void main() { // version=A B auto x1 = X!int; // Error OK auto x2 = X!100; // Error OK foo(100); // Error Error foo("a"); // Error OK } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 19:46:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 02:46:33 +0000 (UTC) Subject: [Issue 10597] opDollar not callable in static constext In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10597 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid Version|D1 & D2 |D2 --- Comment #1 from Kenji Hara 2013-07-10 19:46:29 PDT --- (opDollar is D2 only feature.) https://github.com/D-Programming-Language/dmd/pull/2331 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 21:55:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 04:55:55 +0000 (UTC) Subject: [Issue 10605] New: Lambda grammar is not sufficient Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10605 Summary: Lambda grammar is not sufficient Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-10 21:55:53 PDT --- From: http://forum.dlang.org/post/hrjpqrzfcdyghcxbiiwt at forum.dlang.org Today, compiler accepts following lambda code, but the syntax is not followed by language specification. void main() { auto fp = function (int a) => a; auto dg = delegate (int a) => a; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 21:57:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 04:57:48 +0000 (UTC) Subject: [Issue 10605] Lambda grammar is not sufficient In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10605 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-10 21:57:44 PDT --- https://github.com/D-Programming-Language/dlang.org/pull/351 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 23:06:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 06:06:01 +0000 (UTC) Subject: [Issue 10598] Using not-imported type - AssertFail: 'global.errors' line 6040 'template.c' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10598 --- Comment #1 from Kenji Hara 2013-07-10 23:06:00 PDT --- I couldn't reproduce the issue with git head in Windows. Could you provide us more information? 1. the used dmd version 2. two module file names, file location and directory structure 3. invoke command line and current directory 4. platform -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 23:41:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 06:41:28 +0000 (UTC) Subject: [Issue 10599] CTFE: assert failure interpret.c 310 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10599 --- Comment #2 from Don 2013-07-10 23:41:27 PDT --- This is an error propagation bug that the CTFE AST validator is detecting. The "implicit conversion" error message occurs when running semantic on Bug(). Later on, when compiling bug(), no new error message is generated, even though it uses the ErrorExp from the default initializer of Bug(). So, bug() isn't marked as containing an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 10 23:42:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 06:42:08 +0000 (UTC) Subject: [Issue 10598] Using not-imported type - AssertFail: 'global.errors' line 6040 'template.c' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10598 --- Comment #2 from QAston 2013-07-10 23:42:07 PDT --- dmd version: 2.063.2 platform: win8 64 bit command line invoked from a\: dmd a/app.d a/notimported.d dir structure: a\ a\notimported.d a\app.d The bug here appears to be that i'm able to use a.notimported in app.d without importing it. In setup without "a" package I simply gen an error about unknown symbol "notimported". . -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 01:52:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 08:52:29 +0000 (UTC) Subject: [Issue 10606] New: DMD Exit code 139 Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10606 Summary: DMD Exit code 139 Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: kozzi11 at gmail.com --- Comment #0 from Daniel Kozak 2013-07-11 01:52:23 PDT --- When I try compile code like this: module main; class A(T) { static string g(string v) { return "a" ~ v; } immutable b = immutable C!(T)("u"); } class B : A!(B) {} immutable struct C(T) { string a; alias a this; this(string a) { this.a = T.g(a); // but with this.a = a it is ok; } } void main(string[] args) {} I get Exit code 139 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 02:46:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 09:46:55 +0000 (UTC) Subject: [Issue 10607] New: DirEntry has no constructor Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10607 Summary: DirEntry has no constructor Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-11 02:46:53 PDT --- A DirEntry can be constructed via "dirEntry(path)", however, "DirEntry(path)" will NOT construc a DirEntry. Also, it is possible to intiailize a DirEntry from another DirEntry: DirEntry a; DirEntry b = DirEntry(a); This actually creates a non-initialized DirEntry, and the construct should not be accepted anyways. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 02:48:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 09:48:34 +0000 (UTC) Subject: [Issue 10607] DirEntry has no constructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10607 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Status|NEW |ASSIGNED AssignedTo|nobody at puremagic.com |monarchdodra at gmail.com --- Comment #1 from monarchdodra at gmail.com 2013-07-11 02:48:32 PDT --- https://github.com/D-Programming-Language/phobos/pull/1407 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 03:29:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 10:29:32 +0000 (UTC) Subject: [Issue 10525] Struct as key in Associative array ignores value semantics In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10525 --- Comment #2 from Michal Minich 2013-07-11 03:29:28 PDT --- (In reply to comment #1) > This is not really a bug. Structs by default are bitwise-compared. This is a bug. structs are deeply compared by default as of last dmd release. I included an example of that in the bug report code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 05:06:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 12:06:21 +0000 (UTC) Subject: [Issue 10608] New: std.typecons.RefCounted has very poor diagnostics Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10608 Summary: std.typecons.RefCounted has very poor diagnostics Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-11 05:06:19 PDT --- Example 1, passing too many arguments to the ctor: ----- import std.typecons; struct S { this(int x, int y) { _data = typeof(_data)(x, y); } struct T { this(int x) { } } RefCounted!T _data; } void main() { } ----- $ dmd test.d > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\conv.d(3673): Error: static assert (2u == 1u) is false > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\typecons.d(3362): instantiated from here: emplace!(T, int, int) > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\typecons.d(3412): instantiated from here: initialize!(int, int) > test.d(9): instantiated from here: __ctor!(int, int) Example 2, passing too few arguments to the ctor: ----- import std.typecons; struct S { this(int x) { _data = typeof(_data)(x); } struct T { this(int x, int y) { } } RefCounted!T _data; } void main() { } ----- $ dmd test.d > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\conv.d(3676): Error: cannot implicitly convert expression (_param_1) of type int to T > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\typecons.d(3362): Error: template instance std.conv.emplace!(T, int) error instantiating > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\typecons.d(3412): instantiated from here: initialize!(int) test.d(9): instantiated from here: __ctor!(int) > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\typecons.d(3412): Error: template instance std.typecons.RefCounted!(T).RefCounted.RefCountedStore.initialize!(int) error instantiating > test.d(9): instantiated from here: __ctor!(int) > test.d(9): Error: template instance std.typecons.RefCounted!(T).RefCounted.__ctor!(int) error instantiating Example 3, accessing uninitialized payload: ----- import std.typecons; struct S { void test() { assert(_data.x == 1); } struct Payload { int x; } RefCounted!(Payload, RefCountedAutoInitialize.no) _data; } void main() { S s; s.test(); } ----- $ dmd test.d > core.exception.AssertError at std.typecons(3507): Assertion failure -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 05:13:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 12:13:27 +0000 (UTC) Subject: [Issue 10609] New: Refused UFCS in __traits(compile) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10609 Summary: Refused UFCS in __traits(compile) Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-11 05:13:26 PDT --- int foo(int x) { return x; } void main() { immutable x = 1; static if (__traits(compiles, foo(x))) pragma(msg, "OK1"); static if (__traits(compiles, 1.foo)) pragma(msg, "OK2"); static if (__traits(compiles, x.foo)) pragma(msg, "OK3"); } Prints: OK1 OK2 Expected: OK1 OK2 OK3 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 05:16:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 12:16:58 +0000 (UTC) Subject: [Issue 10610] New: interpret.c:4067 Assertion Failure Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10610 Summary: interpret.c:4067 Assertion Failure Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.97all at gmail.com --- Comment #0 from Ryuichi OHORI 2013-07-11 05:16:57 PDT --- The code cause compiler crash. ----- /d731/f346.d(21): Error: constructor f346.Polynomial!(int).Polynomial.this (int[] coefs) is not callable using argument types () /d731/f346.d(21): Error: cannot implicitly convert expression (Polynomial(null)) of type f346.Polynomial!(int).Polynomial to immutable(Polynomial) /d731/f346.d(6): Error: template instance f346.Polynomial!(int) error instantiating dmd: interpret.c:4067: virtual Expression* CallExp::interpret(InterState*, CtfeGoal): Assertion `thisval && thisval->op == ((TOK)(TOKMAX+1))' failed. ----- import std.numeric : gcd; import std.algorithm : max; void main() { auto f = new Polynomial!int([1, 2, 3, 2, 1, 0, 0, 1, 1, 1]); f.gcd(f); } class Polynomial(T) // T?????? { this (T[] coefs) { this._coefs = coefs; } int opCmp(int rhs) immutable { return 1; } static immutable(Polynomial!T) min = new Polynomial!T(); private: T[] _coefs; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 06:35:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 13:35:34 +0000 (UTC) Subject: [Issue 10350] Valid code cannot be compiled with "-inline" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10350 Joseph Rushton Wakeling changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.wakeling at webdrake.ne | |t --- Comment #1 from Joseph Rushton Wakeling 2013-07-11 06:35:32 PDT --- Interesting -- I have a similar problem when compiling a program using schwartzSort with the -debug flag: import std.algorithm, std.range; void main() { size_t[] x = [4, 9, 3, 2, 1, 10, 8, 5, 7, 6]; size_t[] i = iota(x.length).array; schwartzSort!(a => x[a], "a < b")(i); } This compiles fine with dmd -inline but generates a similar error message when dmd -debug is used: /opt/dmd/include/d2/std/algorithm.d(9117): Error: delegate schwartz.main.__lambda2!ulong.__lambda2 is a nested function and cannot be accessed from schwartz.main.schwartzSort!(__lambda2, "a < b", cast(SwapStrategy)0, ulong[]).__lambda1621!(ulong, ulong).__lambda1621 /opt/dmd/include/d2/std/algorithm.d(9117): Error: delegate schwartz.main.__lambda2!ulong.__lambda2 is a nested function and cannot be accessed from schwartz.main.schwartzSort!(__lambda2, "a < b", cast(SwapStrategy)0, ulong[]).__lambda1621!(ulong, ulong).__lambda1621 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 07:17:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 14:17:59 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 --- Comment #5 from Steven Schveighoffer 2013-07-11 07:17:57 PDT --- (In reply to comment #3) > That's exactly the current compiler's behavior. "auto ref" always behave as > "ref" parameter against lvalue argument `i`, then T[] cannot deduce type T from > immutable(int[]). To the user, auto ref should really mean "use ref if possible, otherwise do not" In other words, I think auto ref should be the equivalent of having two identical templates, one with ref, and one without. Because IFTI can do some implicit casting, and implicit casting changes lvalues to rvalues, I think the rule is incorrect. The algorithm should be: If lvalue, then try ref. If that does not work, try non-ref version. If that does not work, error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 08:22:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 15:22:29 +0000 (UTC) Subject: [Issue 10611] New: Add -h as shorthand for --help Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10611 Summary: Add -h as shorthand for --help Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: wyatt.epp at gmail.com --- Comment #0 from Wyatt 2013-07-11 08:22:27 PDT --- Created an attachment (id=1232) Two lines changed. Just a tiny usability tweak that makes my life a little less annoying when I have to check the dmd options. (Disclaimer, I haven't tested the attached patch quite yet.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 08:28:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 15:28:34 +0000 (UTC) Subject: [Issue 10611] Add -h as shorthand for --help In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10611 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #1 from bearophile_hugs at eml.cc 2013-07-11 08:28:32 PDT --- What's the point of using --help with dmd? If you want the help just call dmd with no switches: dmd -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 09:09:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 16:09:08 +0000 (UTC) Subject: [Issue 10611] Add -h as shorthand for --help In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10611 --- Comment #2 from Wyatt 2013-07-11 09:09:07 PDT --- (In reply to comment #1) > What's the point of using --help with dmd? > If you want the help just call dmd with no switches: > > dmd Honestly? I had no idea that was the case. I certainly don't expect that behaviour, and I question whether many others would either. I realise that POSIX doesn't specify -h or --help (I might consider this an oversight on their part), but one or both are present in most utilities by convention, unlike printing help in the absence of arguments (which doesn't appear to have any consistency whatsoever). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 09:12:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 16:12:43 +0000 (UTC) Subject: [Issue 10612] New: Regression (2.064 HEAD): ICE on using enum as hash key with mutual module imports Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10612 Summary: Regression (2.064 HEAD): ICE on using enum as hash key with mutual module imports Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-11 09:12:42 PDT --- test.d: ----- module test; import foo; enum E { a, } ----- foo.d: ----- module foo; import test; string[E] es; ----- 2.063 $ dmd -c test.d > 2.064: $ dmd -c test.d > assert mtype.c(7524) sym->memtype It fails if the enum is used as the hash key type, but it works if it's used as the hash value type. Stack trace: ----- 0018ef8c 00465bd8 image00400000!halt+0x5 [mars.c @ 314] 0018efa0 0045fd93 image00400000!TypeEnum::nextOf+0x3a [mtype.c @ 7528] 0018efdc 0045f63c image00400000!TypeAArray::semantic+0x12d [mtype.c @ 4522] 0018f004 00488b48 image00400000!TypeDArray::semantic+0x1d [mtype.c @ 4267] 0018f828 00477050 image00400000!VarDeclaration::semantic+0x30f [declaration.c @ 907] 0018f854 004086a3 image00400000!AttribDeclaration::semantic+0x6c [attrib.c @ 163] 0018f890 00470e66 image00400000!Module::semantic+0x10e [module.c @ 734] 0018f940 004086a3 image00400000!Import::semantic+0x110 [import.c @ 245] 0018f97c 00470e66 image00400000!Module::semantic+0x10e [module.c @ 734] 0018fa2c 00476fbd image00400000!Import::semantic+0x110 [import.c @ 245] 0018fa60 0047814e image00400000!AttribDeclaration::semanticNewSc+0xf3 [attrib.c @ 142] 0018fa88 004086a3 image00400000!ProtDeclaration::semantic+0x2f [attrib.c @ 735] 0018fac4 00405062 image00400000!Module::semantic+0x10e [module.c @ 734] 0018ff0c 00405a2c image00400000!tryMain+0x2b28 [mars.c @ 1480] 0018ff48 00576bad image00400000!main+0x43 [mars.c @ 1716] 0018ff88 764733ca image00400000!mainCRTStartup+0xa9 0018ff94 77549ed2 kernel32!BaseThreadInitThunk+0xe 0018ffd4 77549ea5 ntdll!__RtlUserThreadStart+0x70 ----- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 09:41:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 16:41:22 +0000 (UTC) Subject: [Issue 10611] Add -h as shorthand for --help In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10611 --- Comment #3 from bearophile_hugs at eml.cc 2013-07-11 09:41:22 PDT --- (In reply to comment #2) > Honestly? I had no idea that was the case. So now do you want to keep this ER open? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 10:18:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 17:18:33 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 --- Comment #6 from monarchdodra at gmail.com 2013-07-11 10:18:31 PDT --- (In reply to comment #5) > (In reply to comment #3) > > > That's exactly the current compiler's behavior. "auto ref" always behave as > > "ref" parameter against lvalue argument `i`, then T[] cannot deduce type T from > > immutable(int[]). > > To the user, auto ref should really mean "use ref if possible, otherwise do > not" > > In other words, I think auto ref should be the equivalent of having two > identical templates, one with ref, and one without. Because IFTI can do some > implicit casting, and implicit casting changes lvalues to rvalues, I think the > rule is incorrect. For the record (without putting any words in Kenji's mouth), I think he was just stating what the compiler was *doing*, and why the code was rejected. I don't think he meant to say that the current behavior was correct. Kenji, could you confirm that this is what you meant? That this is a correct "rejects-valid" ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 10:30:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 17:30:48 +0000 (UTC) Subject: [Issue 10611] Add -h as shorthand for --help In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10611 --- Comment #4 from Wyatt 2013-07-11 10:30:47 PDT --- (In reply to comment #3) > (In reply to comment #2) > > > Honestly? I had no idea that was the case. > > So now do you want to keep this ER open? I thought that was pretty clear. Regardless of what happens when you invoke dmd without arguments, this is still unexpected, and user expectation is foundational to usability. Educating one user doesn't propagate through them all. It's more useful to more users to follow sed and awk's example than to do what find does: wyatt at Yue ~ $ find -h find: unknown predicate `-h' wyatt at Yue ~ $ dmd -h Error: unrecognized switch '-h' Another possibility would be to simply print the help when the switch is unrecognised, but I dislike this option because it removes the inherent "spell checking" for switches that the current behaviour provides. e.g. wyatt at Yue ~ $ dmd -O -unitest -inline foo.d Error: unrecognized switch '-unitest' wyatt at Yue ~ $ dmd -O2 foo.d Error: unrecognized switch '-O2' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 10:50:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 17:50:18 +0000 (UTC) Subject: [Issue 10613] New: cartesianProduct of const arrays Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10613 Summary: cartesianProduct of const arrays Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-11 10:50:17 PDT --- import std.algorithm: cartesianProduct; void main() { auto a = [1, 2]; cartesianProduct(a, a); // OK const b = [1, 2]; cartesianProduct(b, b); // Error } dmd 2.064alpha gives: ...\dmd2\src\phobos\std\range.d(4158): Error: cannot modify struct result._ranges_field_1 Repeat!const(int) with immutable members ...\dmd2\src\phobos\std\range.d(4454): Error: template instance std.range.Zip!(const(int)[], Repeat!const(int)) error instantiating ...\dmd2\src\phobos\std\algorithm.d(11423): instantiated from here: zip!(const(int)[], Repeat!const(int)) test.d(6): instantiated from here: cartesianProduct!(const(int)[], const(int)[]) ...\dmd2\src\phobos\std\algorithm.d(11423): Error: template instance std.range.zip!(const(int)[], Repeat!const(int)) error instantiating test.d(6): instantiated from here: cartesianProduct!(const(int)[], const(int)[]) test.d(6): Error: template instance std.algorithm.cartesianProduct!(const(int)[], const(int)[]) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 11:04:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 18:04:36 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 --- Comment #7 from Kenji Hara 2013-07-11 11:04:34 PDT --- (In reply to comment #6) > For the record (without putting any words in Kenji's mouth), I think he was > just stating what the compiler was *doing*, and why the code was rejected. I > don't think he meant to say that the current behavior was correct. > > Kenji, could you confirm that this is what you meant? That this is a correct > "rejects-valid" ? No, indeed I just talked about the current compiler's work, but I'm sure that current behavior is correct. The main point is what "auto ref" is doing - it's ref-ness deduction. If given argument is an lvalue, auto ref parameter would become ref. If it's an rvalue, would become non-ref. Nothing else is done. Type deduction and ref-ness deduction are completely orthogonal. It means that the combination of each deduction results might finally reject given argument. It's exactly what happened in the OP code. So I can say it's expected behavior. I believe that one language feature (in here "auto ref") should do just one thing correctly. Orthogonality between each features could reduce language's "special case", and combining them would bring abundant usage. For example, when you use "auto ref", the ref-ness deduction reliably avoids copy-construction of given argument. A brief conclusion is: "auto ref" is not a magic parameter. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 11:17:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 18:17:32 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 --- Comment #8 from monarchdodra at gmail.com 2013-07-11 11:17:31 PDT --- (In reply to comment #7) > (In reply to comment #6) > > For the record (without putting any words in Kenji's mouth), I think he was > > just stating what the compiler was *doing*, and why the code was rejected. I > > don't think he meant to say that the current behavior was correct. > > > > Kenji, could you confirm that this is what you meant? That this is a correct > > "rejects-valid" ? > > No, indeed I just talked about the current compiler's work, but I'm sure that > current behavior is correct. > > The main point is what "auto ref" is doing - it's ref-ness deduction. > If given argument is an lvalue, auto ref parameter would become ref. If it's an > rvalue, would become non-ref. Nothing else is done. > Type deduction and ref-ness deduction are completely orthogonal. It means that > the combination of each deduction results might finally reject given argument. > It's exactly what happened in the OP code. > > So I can say it's expected behavior. I strongly disagree. The argument of "ref-ness deduction" should be applied *after* type deduction. though. Applying it *before* makes no sense. Having a function that accepts an RValue of type U, yet reject an LValue of type U, is unheard of. It is strongly anti-expected. Finally, regardless of "how" auto ref works, this definitely goes against "what" auto ref is trying to solve: Writing functions that can take either by value or by ref, without having to write overloads. As is, the only solution here is to *not* use auto ref, but instead, write ref/value overloads: auto ref => Failed to provide solution it was designed for => design is flawed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 11:32:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 18:32:47 +0000 (UTC) Subject: [Issue 10574] "auto ref" fails to match when IFTI succeeds (strip to level const) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10574 --- Comment #9 from Steven Schveighoffer 2013-07-11 11:32:46 PDT --- (In reply to comment #7) > The main point is what "auto ref" is doing - it's ref-ness deduction. > If given argument is an lvalue, auto ref parameter would become ref. If it's an > rvalue, would become non-ref. Nothing else is done. > Type deduction and ref-ness deduction are completely orthogonal. It means that > the combination of each deduction results might finally reject given argument. > It's exactly what happened in the OP code. I agree that was what auto-ref is supposed to do, but in this case, it's hurting more than helping. I can't think of a valid reason to forbid this, can you? This bug report should be changed to an enhancement, though (and the description appropriately modified). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 12:17:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 19:17:23 +0000 (UTC) Subject: [Issue 10614] New: A delegate erroneously inferred as impure Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10614 Summary: A delegate erroneously inferred as impure Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-11 12:17:22 PDT --- struct Foo { immutable int y; void bar(TF)(TF f) pure { f(1); } void spam() pure { bar((int x) => y); } } void main() {} dmd 2.064alpha gives errors, but I think the code should be accepted: test.d(4): Error: pure function 'test.Foo.bar!(immutable(int) delegate(int x) nothrow @safe).bar' cannot call impure delegate 'f' test.d(7): Error: template instance test.Foo.bar!(immutable(int) delegate(int x) nothrow @safe) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 12:53:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 19:53:31 +0000 (UTC) Subject: [Issue 10615] New: More range value analysis for indexed array Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10615 Summary: More range value analysis for indexed array Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-11 12:53:29 PDT --- This issue is between an enhancement request and a rejects-valid bug report. uint i = 100; void main(in string[] args) { auto j = args.length; ubyte x1 = (i ^^ 2) % 256; // OK ubyte x2 = (i ^^ 3) % 256; // OK ubyte[] arr = [(i ^^ 2) % 256, (i ^^ 3) % 256]; // OK! ubyte y = [(i ^^ 2) % 256, (i ^^ 3) % 256][j]; // Error } DMD 2.064alpha gives: test2.d(7): Error: cannot implicitly convert expression ([(uint __powtmp8 = i; , __powtmp8 * __powtmp8) % 256u, (uint __powtmp9 = i; , __powtmp9 * __powtmp9 * __powtmp9) % 256u][j]) of type uint to ubyte The lines with x1 and x2 are accepted, because the range analysis is able to infer those are in-range assignments. While the assignment of y is refused, despite all the contents of the array can be inferred as castable to ubyte, as shown in assignment of arr. I think the line with y should be accepted. Perhaps the issue shown here causes the difference between the two following cases of "generate", where the first is accepted and the second is refused: ubyte generate1(s...)() { ubyte[10] result; foreach (immutable i, ref item; result) item = s[0][0] << 4; return result[0]; } ubyte generate2(s...)() { ubyte[10] result; foreach (immutable i, ref item; result) item = s[0][i % 3] << 4; // line 11 return result[0]; } void main() { enum ubyte[16] data = [1, 2, 3, 4]; auto g1 = generate1!data; // OK auto g2 = generate2!data; // error } Where DMD 2.064alpha gives: test.d(10): Error: cannot implicitly convert expression (cast(int)[cast(ubyte)1u, cast(ubyte)2u, cast(ubyte)3u, cast(ubyte)4u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u][i % 3u] << 4) of type int to ubyte test.d(16): Error: template instance test.generate2!([cast(ubyte)1u, cast(ubyte)2u, cast(ubyte)3u, cast(ubyte)4u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u]) error instantiating Issue discussed here: http://forum.dlang.org/thread/lnitjekzqoozqmrqtuim at forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 13:19:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 20:19:08 +0000 (UTC) Subject: [Issue 10612] Regression (2.064 HEAD): ICE on using enum as hash key with mutual module imports In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10612 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-11 13:19:07 PDT --- https://github.com/D-Programming-Language/dmd/pull/2336 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 15:32:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 22:32:46 +0000 (UTC) Subject: [Issue 10064] opDollar called on garbage In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10064 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-11 15:32:44 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c426980fd31433c0bbc182a1f9cc9476fe625278 fix Issue 10064 - opDollar called on garbage https://github.com/D-Programming-Language/dmd/commit/33ce37d6495aad7a3d6644392cf47e1af9d9d493 Merge pull request #2331 from 9rnsr/fix10064 Issue 10064 - opDollar called on garbage -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 15:32:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 22:32:48 +0000 (UTC) Subject: [Issue 10597] opDollar not callable in static constext In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10597 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-11 15:32:47 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4dfcc215b87ea5f1db8dce85dbba97992938e067 fix Issue 10597 - opDollar not callable in static context -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 15:32:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 22:32:58 +0000 (UTC) Subject: [Issue 10064] opDollar called on garbage In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10064 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 15:52:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 22:52:56 +0000 (UTC) Subject: [Issue 8330] std.algorithm.find doesn't handle reference type ranges correctly In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8330 John Colvin changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |john.loughran.colvin at gmail. | |com Resolution| |FIXED --- Comment #1 from John Colvin 2013-07-11 23:52:54 BST --- No longer occurs. Both examples run fine on git master, although this could well have been fixed ages ago. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 16:22:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 11 Jul 2013 23:22:04 +0000 (UTC) Subject: [Issue 10616] New: class C: C.D{static class D{}} does not work Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10616 Summary: class C: C.D{static class D{}} does not work Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: timon.gehr at gmx.ch --- Comment #0 from timon.gehr at gmx.ch 2013-07-11 16:22:03 PDT --- Crashes DMD 2.063, is an error with DMD from git head: class C: C.D{static class D{}} The code should compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 17:04:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 00:04:48 +0000 (UTC) Subject: [Issue 10597] opDollar not callable in static constext In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10597 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 20:38:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 03:38:36 +0000 (UTC) Subject: [Issue 10618] Template instance member access disallowed in dynamic array allocation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10618 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-11 20:38:35 PDT --- https://github.com/D-Programming-Language/dmd/pull/2337 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 20:38:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 03:38:56 +0000 (UTC) Subject: [Issue 10609] Refused UFCS in __traits(compile) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10609 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Kenji Hara 2013-07-11 20:38:55 PDT --- https://github.com/D-Programming-Language/dmd/pull/2337 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 20:50:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 03:50:04 +0000 (UTC) Subject: [Issue 10592] Regression of overloaded template function In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10592 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 21:37:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 04:37:40 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #18 from hsteoh at quickfur.ath.cx 2013-07-11 21:37:37 PDT --- Hmph. I'm using bearophile's code with DMD git HEAD, running as dmd -O, and *none* of the cases produce a rotate instruction. :-( Could it be an issue with 32bit vs. 64-bit? I'm running in a purely 64-bit environment. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 21:40:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 04:40:35 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #19 from hsteoh at quickfur.ath.cx 2013-07-11 21:40:34 PDT --- I can't get GDC git HEAD to recognize this pattern either. What am I doing wrong?? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 21:46:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 04:46:06 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #20 from hsteoh at quickfur.ath.cx 2013-07-11 21:46:05 PDT --- Could it be because amd64 doesn't support this optimization? Seems odd, though. I'd expect it to work at least up to 16-bit argument form, since that's common to both x86 and amd. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 23:26:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 06:26:17 +0000 (UTC) Subject: [Issue 7016] local import does not create -deps dependency In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7016 --- Comment #8 from thelastmammoth at gmail.com 2013-07-11 23:26:15 PDT --- see http://forum.dlang.org/post/mailman.1984.1373610213.13711.digitalmars-d at puremagic.com [fix for enumerating local import dependencies, resolving all rdmd link errors] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 23:48:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 06:48:57 +0000 (UTC) Subject: [Issue 10620] New: ICE when using TypeInfo.getHash at compile time Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10620 Summary: ICE when using TypeInfo.getHash at compile time Product: D Version: future Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: doob at me.com --- Comment #0 from Jacob Carlborg 2013-07-11 23:48:56 PDT --- The following code: enum typeId = typeid(int); enum hash = typeId.getHash(cast(void*) 3); Results in the following error: Assertion failed: (thisval && thisval->op == TOKclassreference), function interpret, file interpret.c, line 4067. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 23:49:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 06:49:30 +0000 (UTC) Subject: [Issue 4841] -inline wrecks certain nested structs causing error "*** is a nested function and cannot be accessed from ***" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4841 --- Comment #19 from github-bugzilla at puremagic.com 2013-07-11 23:49:29 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1fbbe5966e372abb20e70c4ac69ecfaeaa6db952 fix Issue 4841 - -inline wrecks certain nested structs causing error "*** is a nested function and cannot be accessed from ***" https://github.com/D-Programming-Language/dmd/commit/c19b8a43f45da1347302d3b49a3d1b0b53997003 Merge pull request #2329 from 9rnsr/fix4841 Issue 4841 - -inline wrecks certain nested structs causing error "*** is a nested function and cannot be accessed from ***" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 11 23:51:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 06:51:28 +0000 (UTC) Subject: [Issue 4841] -inline wrecks certain nested structs causing error "*** is a nested function and cannot be accessed from ***" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4841 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 00:58:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 07:58:52 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #21 from Iain Buclaw 2013-07-12 00:58:49 PDT --- 1. Not my problem. :) 2. When comparing gdc and dmd, make sure your actually looking at object files generated by gdc, and not dmd. :) 3. That's highly unlikely as I've tested on x86_64. :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 01:00:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 08:00:58 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #22 from Iain Buclaw 2013-07-12 01:00:57 PDT --- (In reply to comment #21) > 1. Not my problem. :) > 2. When comparing gdc and dmd, make sure your actually looking at object files > generated by gdc, and not dmd. :) > 3. That's highly unlikely as I've tested on x86_64. :) and 4. Under simple test conditions where all parameter values are const/known, templated function calls tend to have a habit of being inlined / optimised away. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 01:02:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 08:02:54 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #23 from Iain Buclaw 2013-07-12 01:02:52 PDT --- (In reply to comment #22) > (In reply to comment #21) > > 1. Not my problem. :) > > 2. When comparing gdc and dmd, make sure your actually looking at object files > > generated by gdc, and not dmd. :) > > 3. That's highly unlikely as I've tested on x86_64. :) > > and 4. Under simple test conditions where all parameter values are const/known, > templated function calls tend to have a habit of being inlined / optimised > away. and 5. Make sure that you use bearophiles last implementation example. ;) http://d.puremagic.com/issues/show_bug.cgi?id=6829#c12 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 02:00:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 09:00:17 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #24 from bearophile_hugs at eml.cc 2013-07-12 01:59:52 PDT --- (In reply to comment #23) > and 5. Make sure that you use bearophiles last implementation example. ;) Updated code, lacks unittests: import std.traits: isIntegral, isUnsigned; /// Left-shift x by n bits. T rol(T)(in T x, in uint nBits) @safe pure nothrow if (isIntegral!T && isUnsigned!T) in { assert(nBits < (T.sizeof * 8)); } body { return cast(T)((x << nBits) | (x >> ((T.sizeof * 8) - nBits))); } /// Right-shift x by n bits. T ror(T)(in T x, in uint nBits) @safe pure nothrow if (isIntegral!T && isUnsigned!T) in { assert(nBits < (T.sizeof * 8)); } body { return cast(T)((x >> nBits) | (x << ((T.sizeof * 8) - nBits))); } void main() { // Tests to check for assembly output. { __gshared static ubyte xb; __gshared static ushort xs; __gshared static uint xi; __gshared static ulong xl; __gshared static uint yi; rol(xb, yi); // rolb ror(xb, yi); // rorb rol(xs, yi); // rolw ror(xs, yi); // rorw rol(xi, yi); // roll ror(xi, yi); // rorl rol(xl, yi); // version(X86_64) rolq ror(xl, yi); // version(X86_64) rorq } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 06:13:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 13:13:46 +0000 (UTC) Subject: [Issue 10621] New: dirEntry is (now) useless Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10621 Summary: dirEntry is (now) useless Product: D Version: D2 Platform: All URL: http://d.puremagic.com/issues/show_bug.cgi?id=10607 OS/Version: All Status: ASSIGNED Severity: enhancement Priority: P2 Component: Phobos AssignedTo: monarchdodra at gmail.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-12 06:13:45 PDT --- By fixing "Issue 10607 - DirEntry has no constructor" http://d.puremagic.com/issues/show_bug.cgi?id=10607 The function "dirEntry" is now completely useless. It can be replaced by a straight up DirEntry call in all cases. It should be removed (deprecated). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 06:15:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 13:15:52 +0000 (UTC) Subject: [Issue 10621] dirEntry is (now) useless In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10621 --- Comment #1 from monarchdodra at gmail.com 2013-07-12 06:15:51 PDT --- https://github.com/D-Programming-Language/phobos/pull/1407/files -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 07:52:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 14:52:58 +0000 (UTC) Subject: [Issue 10622] New: Wrong "this" pointer in methods called via IUnknown derived interfaces Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10622 Summary: Wrong "this" pointer in methods called via IUnknown derived interfaces Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: sludwig at outerproduct.org --- Comment #0 from S?nke Ludwig 2013-07-12 07:52:57 PDT --- The following program crashes in the second invocation of AddRef (could be any other method defined by IUnknown or a derived interface) because the "this" pointer points to the IUnknown vtable instead of the object's base, which is assumed by the code. --- import std.c.windows.com; import std.c.windows.windows; class Test : IUnknown { int i = 1; ULONG AddRef() { assert(i == 1); return 0; } ULONG AddRef() { assert(i == 1); return 0; } HRESULT AddRef(IID*, void**) { assert(i == 1); return E_FAIL; } } void main() { auto t = new Test; t.AddRef(); // works auto u = cast(IUnknown)t; u.AddRef(); // crash in _d_invariant } --- Setting this to major severity because it makes defining any COM objects in D impossible on Win64 (and thus many COM APIs are unusable). Tested on DMD 2.063.2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 08:13:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 15:13:18 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #25 from hsteoh at quickfur.ath.cx 2013-07-12 08:13:16 PDT --- Nope, it's still not working. I copied-n-pasted exactly the code posted above, and compiled with gdc -frelease -O3 test.d, and here is the disassembly output: 00000000004042d0 <_D4test10__T3rolThZ3rolFNaNbNfxhxkZh>: 4042d0: 40 0f b6 ff movzbl %dil,%edi 4042d4: b9 08 00 00 00 mov $0x8,%ecx 4042d9: 29 f1 sub %esi,%ecx 4042db: 89 f8 mov %edi,%eax 4042dd: d3 f8 sar %cl,%eax 4042df: 89 f1 mov %esi,%ecx 4042e1: d3 e7 shl %cl,%edi 4042e3: 09 f8 or %edi,%eax 4042e5: c3 retq 4042e6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 4042ed: 00 00 00 00000000004042f0 <_D4test10__T3rorThZ3rorFNaNbNfxhxkZh>: 4042f0: 40 0f b6 ff movzbl %dil,%edi 4042f4: b9 08 00 00 00 mov $0x8,%ecx 4042f9: 29 f1 sub %esi,%ecx 4042fb: 89 f8 mov %edi,%eax 4042fd: d3 e0 shl %cl,%eax 4042ff: 89 f1 mov %esi,%ecx 404301: d3 ff sar %cl,%edi 404303: 09 f8 or %edi,%eax 404305: c3 retq 404306: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 40430d: 00 00 00 0000000000404310 <_D4test10__T3rolTtZ3rolFNaNbNfxtxkZt>: 404310: 0f b7 ff movzwl %di,%edi 404313: b9 10 00 00 00 mov $0x10,%ecx 404318: 29 f1 sub %esi,%ecx 40431a: 89 f8 mov %edi,%eax 40431c: d3 f8 sar %cl,%eax 40431e: 89 f1 mov %esi,%ecx 404320: d3 e7 shl %cl,%edi 404322: 09 f8 or %edi,%eax 404324: c3 retq 404325: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 40432c: 00 00 00 40432f: 90 nop 0000000000404330 <_D4test10__T3rorTtZ3rorFNaNbNfxtxkZt>: 404330: 0f b7 ff movzwl %di,%edi 404333: b9 10 00 00 00 mov $0x10,%ecx 404338: 29 f1 sub %esi,%ecx 40433a: 89 f8 mov %edi,%eax 40433c: d3 e0 shl %cl,%eax 40433e: 89 f1 mov %esi,%ecx 404340: d3 ff sar %cl,%edi 404342: 09 f8 or %edi,%eax 404344: c3 retq 404345: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 40434c: 00 00 00 40434f: 90 nop 0000000000404350 <_D4test10__T3rolTkZ3rolFNaNbNfxkxkZk>: 404350: b9 20 00 00 00 mov $0x20,%ecx 404355: 89 f8 mov %edi,%eax 404357: 29 f1 sub %esi,%ecx 404359: d3 e8 shr %cl,%eax 40435b: 89 f1 mov %esi,%ecx 40435d: d3 e7 shl %cl,%edi 40435f: 09 f8 or %edi,%eax 404361: c3 retq 404362: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 404369: 00 00 00 40436c: 0f 1f 40 00 nopl 0x0(%rax) 0000000000404370 <_D4test10__T3rorTkZ3rorFNaNbNfxkxkZk>: 404370: b9 20 00 00 00 mov $0x20,%ecx 404375: 89 f8 mov %edi,%eax 404377: 29 f1 sub %esi,%ecx 404379: d3 e0 shl %cl,%eax 40437b: 89 f1 mov %esi,%ecx 40437d: d3 ef shr %cl,%edi 40437f: 09 f8 or %edi,%eax 404381: c3 retq 404382: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 404389: 00 00 00 40438c: 0f 1f 40 00 nopl 0x0(%rax) 0000000000404390 <_D4test10__T3rolTmZ3rolFNaNbNfxmxkZm>: 404390: b9 40 00 00 00 mov $0x40,%ecx 404395: 48 89 f8 mov %rdi,%rax 404398: 29 f1 sub %esi,%ecx 40439a: 48 d3 e8 shr %cl,%rax 40439d: 89 f1 mov %esi,%ecx 40439f: 48 d3 e7 shl %cl,%rdi 4043a2: 48 09 f8 or %rdi,%rax 4043a5: c3 retq 4043a6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 4043ad: 00 00 00 00000000004043b0 <_D4test10__T3rorTmZ3rorFNaNbNfxmxkZm>: 4043b0: b9 40 00 00 00 mov $0x40,%ecx 4043b5: 48 89 f8 mov %rdi,%rax 4043b8: 29 f1 sub %esi,%ecx 4043ba: 48 d3 e0 shl %cl,%rax 4043bd: 89 f1 mov %esi,%ecx 4043bf: 48 d3 ef shr %cl,%rdi 4043c2: 48 09 f8 or %rdi,%rax 4043c5: c3 retq 4043c6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 4043cd: 00 00 00 It's still using shift + bitwise OR instead of substituting a rotate instruction. I'm also on Linux x86_64 (so says uname -m), so I've no idea what I'm doing wrong. And gdc --version says it's gdc (GCC) 4.8.1. Did something go wrong/missing in my gdc build?? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 08:21:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 15:21:22 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #26 from Iain Buclaw 2013-07-12 08:21:21 PDT --- Don't currently have a gdc 4.8 compiler at hand to test... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 08:40:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 15:40:45 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #27 from hsteoh at quickfur.ath.cx 2013-07-12 08:40:43 PDT --- Huh? So which gdc have you been using to test this earlier? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 08:50:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 15:50:05 +0000 (UTC) Subject: [Issue 10622] Wrong "this" pointer in methods called via IUnknown derived interfaces In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10622 --- Comment #1 from S?nke Ludwig 2013-07-12 08:50:03 PDT --- Actually, as far as I understand, the pointer is correct and the function body is wrong in assuming that it points to the object's base. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 08:52:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 15:52:51 +0000 (UTC) Subject: [Issue 10623] New: destructor not called for function argument if constructing another argument throws Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10623 Summary: destructor not called for function argument if constructing another argument throws Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrei at erdani.com --- Comment #0 from Andrei Alexandrescu 2013-07-12 08:52:50 PDT --- Consider: import std.stdio; struct S1 { this(int) { writeln("constructed"); } ~this() { writeln("destroyed"); } } struct S2 { this(int) { throw new Exception("a"); } } void fun(S1, S2, S1) {} void main() { fun(S1(2), S2(2), S1(2)); } Running this code will create an object of type S1 that is never destroyed. This is somewhat related to http://d.puremagic.com/issues/show_bug.cgi?id=9704, just there's no postblit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 09:08:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 16:08:37 +0000 (UTC) Subject: [Issue 10623] destructor not called for function argument if constructing another argument throws In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10623 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim at maxim-fomin.ru --- Comment #1 from Maxim Fomin 2013-07-12 09:08:36 PDT --- I think this can be marked as a dup because it is a particular situation of essentially the same case described in issue 9704. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 09:32:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 16:32:44 +0000 (UTC) Subject: [Issue 10624] New: [REG2.064a] ICE with tuple comparison Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10624 Summary: [REG2.064a] ICE with tuple comparison Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-12 09:32:43 PDT --- The regression was caused by: https://github.com/D-Programming-Language/dmd/commit/d9c710351028452533241e069bdde9034fc4cde8 Following code causes ICE with -c switch. $ dmd -c test.d Internal error: backend\cod3.c 1953 With debug build dmd: $ dmd -c test.d DMD v2.064 DEBUG el:00382D4C cnt=0 cs=0 < TYbool 00382E64 00382CA4 el:00382E64 cnt=0 cs=0 * 1 TYstruct 003820D8 el:003820D8 cnt=1 cs=0 var TY* zis el:00382CA4 cnt=0 cs=0 * 1 TYstruct 00382C6C el:00382C6C cnt=1 cs=0 var TY* rhsPA TYstruct Internal error: backend\cod3.c 1953 struct Msg {} struct Tuple(Specs...) { Specs expand; alias expand this; } void main() { Variant data; data = Tuple!Msg(); } struct Variant { ptrdiff_t function() fptr = &handler!(void); static ptrdiff_t handler(A : void)() { return 0; } static ptrdiff_t handler(A)() { A* zis; A* rhsPA; { return *zis < *rhsPA ? -1 : 1; // Tupple!(Msg) < Tupple!(Msg) // Tupple!(Msg).expand < Tupple!(Msg).expand // CmpExp(TOKtuple, TOKtuple) is incorrectly compiled in front-end } return 0; } Variant opAssign(T)(T rhs) { fptr = &handler!(T); return this; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 09:57:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 16:57:23 +0000 (UTC) Subject: [Issue 10625] New: Compiler should warn or disallow using slice syntax in initialization Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10625 Summary: Compiler should warn or disallow using slice syntax in initialization Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-12 09:57:21 PDT --- ----- void main() { int[] source = [0, 1]; int[] arr1 = new int[](2); arr1[] = source[]; assert(arr1 !is source); // ok int[] arr2 = source[]; // looks like a copy assert(arr2 !is arr2); // assert fails: but in fact it's not! } ----- The 'int[] arr2 = source[];' syntax appears as though the source contents are copied into arr2, but in fact this is the same code as 'int[] arr2 = source;'. Since [] has a very special meaning, the above should either: 1) Become an actual deep copy, meaning arr2 would have to allocate space first and then copy contents. This would be a breaking and negative change due to performance implications. 2) Not compile. It looks like a deep copy but it isn't, and this can cause issues down the road (for example using memcpy or even OpenGL functions can create hard to track problems due to using the source and target arrays which point to the same memory). I'd vote heavily towards 2. Of course one can always use 'int[] arr2 = source.dup'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 10:30:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 17:30:46 +0000 (UTC) Subject: [Issue 10577] 2.063 Mixin Regression (works with 2.062) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10577 Puneet Goel changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME | --- Comment #5 from Puneet Goel 2013-07-12 10:30:43 PDT --- Slightly different test case. But since this too is related, I am re-opening the same bug. Let me know if I should instead be opening a separate bug for this. With this code, I am getting a *spurious* deprecation warning (compiles without warning with version 2.062). test.d(37): Deprecation: class test.derived use of test.base.foo() hidden by derived is deprecated. Use 'alias base.foo foo;' to introduce base class overload set. // test.d Code starts here enum sync; public template get_sync(size_t I, A...) { static if(I == A.length) enum bool get_sync = false; else static if(is(A[I] == sync)) enum bool get_sync = true; else enum bool get_sync = get_sync!(I+1, A); } template add_sync(T, size_t ITER=0) { static if(ITER == (__traits(derivedMembers, T).length)) { enum string add_sync = ""; } else { enum string mem = __traits(derivedMembers, T)[ITER]; enum string add_sync = "static if(! __traits(isVirtualMethod, " ~ mem ~ ")) {" ~ "mixin(add_sync!(get_sync!(0, __traits(getAttributes, " ~ mem ~ ")), \"" ~ mem ~ "\"));} " ~ add_sync!(T, ITER+1); } } template add_sync(bool A, string M) { static if(A) { enum string add_sync = " auto " ~ M[1..$] ~ "() {synchronized(this) return " ~ M ~ ";}"; } else { enum string add_sync = ""; } } abstract class base { mixin(add_sync!(base)); @sync private bool _bar; public void foo(); } class derived: base { public override void foo() {} } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 10:33:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 17:33:06 +0000 (UTC) Subject: [Issue 10625] Compiler should warn or disallow using slice syntax in initialization In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10625 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #1 from bearophile_hugs at eml.cc 2013-07-12 10:33:05 PDT --- Related to Issue 7445 ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 10:51:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 17:51:33 +0000 (UTC) Subject: [Issue 10600] regression(2.063.2) ICE: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10600 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull --- Comment #1 from Kenji Hara 2013-07-12 10:51:30 PDT --- https://github.com/D-Programming-Language/dmd/pull/2338 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 10:51:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 17:51:34 +0000 (UTC) Subject: [Issue 10624] [REG2.064a] ICE with tuple comparison In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10624 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-12 10:51:33 PDT --- https://github.com/D-Programming-Language/dmd/pull/2338 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 11:05:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 18:05:13 +0000 (UTC) Subject: [Issue 10623] destructor not called for function argument if constructing another argument throws In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10623 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |monarchdodra at gmail.com See Also| |http://d.puremagic.com/issu | |es/show_bug.cgi?id=9704 Resolution| |DUPLICATE --- Comment #2 from monarchdodra at gmail.com 2013-07-12 11:05:06 PDT --- (In reply to comment #1) > I think this can be marked as a dup because it is a particular situation of > essentially the same case described in issue 9704. This indeed a more generically worded description, but essentially, the same thing. Also, (since links never hurt), this issue was also discussed recently in learn: http://forum.dlang.org/thread/20130628005448.00000969 at unknown?page=2 *** This issue has been marked as a duplicate of issue 9704 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 11:05:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 18:05:15 +0000 (UTC) Subject: [Issue 9704] Destructor not called on function calls if postblit throws In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9704 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrei at erdani.com --- Comment #3 from monarchdodra at gmail.com 2013-07-12 11:05:06 PDT --- *** Issue 10623 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: ------- From d-bugmail at puremagic.com Fri Jul 12 11:08:02 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 18:08:02 +0000 (UTC) Subject: [Issue 9704] Destructor not called on function calls if postblit throws In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9704 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #4 from monarchdodra at gmail.com 2013-07-12 11:07:53 PDT --- (In reply to comment #3) > *** Issue 10623 has been marked as a duplicate of this issue. *** For reference, this was also discussed in learn. http://forum.dlang.org/group/digitalmars.D.learn http://forum.dlang.org/thread/20130628005448.00000969 at unknown -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 11:44:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 18:44:36 +0000 (UTC) Subject: [Issue 10599] CTFE: assert failure interpret.c 310 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10599 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-12 11:44:35 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8a9421b4d1e8b577a412a40bce0979a17a63a9c8 Fix bug 10599 CTFE assert with bad struct initializer This is an ErrorExp propagation/gagging bug. Errors in struct initializers don't generate error messages when used, but still need to report an error to the enclosing function. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 11:45:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 18:45:03 +0000 (UTC) Subject: [Issue 10599] CTFE: assert failure interpret.c 310 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10599 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 13:38:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 20:38:24 +0000 (UTC) Subject: [Issue 10589] GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10589 Rainer Schuetze changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagitario at gmx.de --- Comment #1 from Rainer Schuetze 2013-07-12 13:37:39 PDT --- I think you are mixing two levels of abstractions here: ubyte* p = cast(ubyte*)GC.malloc(i, GC.BlkAttr.APPENDABLE); ubyte[] s = p[0 .. 0]; writefln("%6s: s.capacity is %6s", i, s.capacity); GC.malloc requests raw memory from the GC. capacity is a function very specific to the way arrays are implemented on top of it in rt/lifetime.d. It assumes that any allocation with bit APPENDABLE set and that is larger than a page of 4kB reserves 16 bytes at the start of the allocation to store the actually used length of the memory. So, to create an empty array manually that works with capacity, you'd have to set s to auto start = i <= 2048 ? 0 : 16; ubyte[] s = p[start .. start]; and you'd better clean that full memory block first to avoid the length field containing garbage. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:07:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:07:06 +0000 (UTC) Subject: [Issue 1982] [CTFE] Problems with compile-time null In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1982 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-12 14:07:00 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/64ea3d8a7223f6c9b1d00e167a5ced4bf20e7992 Fix bug 1982 [CTFE] Problems with compile-time null Test case only. This was fixed by doing const-folding in CTFE. https://github.com/D-Programming-Language/dmd/commit/a0ba3b2aa31d93709a1ed3e21f5a2deca6c761fc Merge pull request #2339 from donc/fourCTFEtestcases Test cases for bugs 1982, 7988, 8253, and 8285. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:07:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:07:11 +0000 (UTC) Subject: [Issue 7988] [CTFE] CTFE return values should be allowed in compile-time expressions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7988 --- Comment #1 from github-bugzilla at puremagic.com 2013-07-12 14:07:10 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9d8d7864c85f4e07be7a7d24ba92108f2206b9f4 Fix issue 7988 allow CTFE return values in compile-time exprs Test case only. This bug was fixed by doing constfolding in CTFE. https://github.com/D-Programming-Language/dmd/commit/a0ba3b2aa31d93709a1ed3e21f5a2deca6c761fc Merge pull request #2339 from donc/fourCTFEtestcases Test cases for bugs 1982, 7988, 8253, and 8285. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:07:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:07:15 +0000 (UTC) Subject: [Issue 8253] CTFE ICE: calling of member function of non-CTFE class variable In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8253 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-12 14:07:14 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/339ff2a11b95a42b31e0d11ba17ea970c8cb391b Fix issue 8253 ICE: calling of member function of non-CTFE class variable Test case only, already fixed by doing constfolding in CTFE. https://github.com/D-Programming-Language/dmd/commit/a0ba3b2aa31d93709a1ed3e21f5a2deca6c761fc Merge pull request #2339 from donc/fourCTFEtestcases Test cases for bugs 1982, 7988, 8253, and 8285. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:07:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:07:21 +0000 (UTC) Subject: [Issue 8285] Issue with slice returned from CTFE function In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8285 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-12 14:07:19 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f5c5d43e35a48d6cc63a2fe05c68f8b88ef5e21d Fix issue 8285 Issue with slice returned from CTFE function Test case only; fixed by using CTFE to do constfolding. https://github.com/D-Programming-Language/dmd/commit/a0ba3b2aa31d93709a1ed3e21f5a2deca6c761fc Merge pull request #2339 from donc/fourCTFEtestcases Test cases for bugs 1982, 7988, 8253, and 8285. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:17:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:17:15 +0000 (UTC) Subject: [Issue 9704] Destructor not called on function calls if postblit throws In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9704 --- Comment #5 from Andrei Alexandrescu 2013-07-12 14:17:12 PDT --- Pasting the additional example here for reference: import std.stdio; struct S1 { this(int) { writeln("constructed"); } ~this() { writeln("destroyed"); } } struct S2 { this(int) { throw new Exception("a"); } } void fun(S1, S2, S1) {} void main() { fun(S1(2), S2(2), S1(2)); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:29:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:29:46 +0000 (UTC) Subject: [Issue 10589] GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10589 --- Comment #2 from monarchdodra at gmail.com 2013-07-12 14:29:45 PDT --- (In reply to comment #1) > I think you are mixing two levels of abstractions here: > > ubyte* p = cast(ubyte*)GC.malloc(i, GC.BlkAttr.APPENDABLE); > ubyte[] s = p[0 .. 0]; > writefln("%6s: s.capacity is %6s", i, s.capacity); > > GC.malloc requests raw memory from the GC. capacity is a function very specific > to the way arrays are implemented on top of it in rt/lifetime.d. It assumes > that any allocation with bit APPENDABLE set and that is larger than a page of > 4kB reserves 16 bytes at the start of the allocation to store the actually used > length of the memory. > So, to create an empty array manually that works with capacity, you'd have to > set s to > > auto start = i <= 2048 ? 0 : 16; > ubyte[] s = p[start .. start]; Hum. That worked. Is the memory layout for the APPENDABLE data documented somewhere, or are these just reverse-engineered magic numbers? > and you'd better clean that full memory block first to avoid the length field > containing garbage. Nope (I think). Length is carried in the slice, not the block. Block only contains capacity/used info. ------------------------------------------------------------------------ Thank you for your answer. I suppose the behavior isn't going to change. Still, this requires more support. I think APPENDABLE should be better documented. In particular, the magic numbers should be user accessible via manifest constants, or functions, so as to not have to guess/reverse engineer them. This is what I've discovered: 0 - 256 bytes: 1 Byte APPENDABLE info at end; Capacity = memory size - 1; 257 - 2048 bytes: 2 Byte APPENDABLE info at end; Capacity = memory size - 2; 2049 - **** bytes: 16 Byte APPENDABLE info at beginning; 1 Byte unknown info at end; Capacity = memory size - 17; Are these numbers platform depending? What the heck is that 1 byte that leads to 17 byte difference I'm seeing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:43:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:43:52 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 --- Comment #17 from jfanatiker at gmx.at 2013-07-12 14:43:48 PDT --- I just finished a new implementation, replacing the template mixin with a string mixin. You can find it here: https://github.com/phobos-x/phobosx/blob/master/source/phobosx/signal.d All unittests pass, you don't need any patched compiler. I still have to add some more checks and do some polishing, I will also put it in the dub registry. But you and David seem to have an urgent need, so feel free to try it out immediately - Be my pre-alpha Testers :-) Best regards, Robert -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 14:59:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 12 Jul 2013 21:59:13 +0000 (UTC) Subject: [Issue 10589] GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10589 --- Comment #3 from Rainer Schuetze 2013-07-12 14:59:12 PDT --- >Is the memory layout for the APPENDABLE data documented somewhere, or are these just reverse-engineered magic numbers? There is some description in rt/lifetime.d starting around line 200. >Nope (I think). Length is carried in the slice, not the block. > Block only contains capacity/used info. Sorry, I meant the "used" info that must be reset. >In particular, the magic numbers should be user accessible via manifest > constants, or functions, so as to not have to guess/reverse engineer them. The constants are defined privately in lifetime.d as SMALLPAD, MEDPAD and LARGEPAD. I suspect the trailing byte for large arrays is added so that arr[$..$] always points into the same memory block, and not the next one. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 18:44:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 01:44:08 +0000 (UTC) Subject: [Issue 10626] New: ICE with ternary operator and vector operation Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10626 Summary: ICE with ternary operator and vector operation Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Keywords: ice Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: nilsbossung at googlemail.com --- Comment #0 from Nils 2013-07-12 18:44:07 PDT --- Fails with v2.064-devel-a0ba3b2. Works with v2.063.2. --- cat > test.d << code void main() { double[2] v; bool b; double[2] result = (b ? 1 : -1) * v[]; } code dmd -c -o- test.d --- dmd: arrayop.c:525: virtual void BinExp::buildArrayIdent(OutBuffer*, Expressions*): Assertion `0' failed. Aborted (core dumped) --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 18:56:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 01:56:43 +0000 (UTC) Subject: [Issue 9400] initializing enum T[n] with a single value changes its type to T In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9400 Nils changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #1 from Nils 2013-07-12 18:56:42 PDT --- apparently fixed in the meantime -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 12 19:31:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 02:31:21 +0000 (UTC) Subject: [Issue 10626] ICE with vector operation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10626 Nils changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ICE with ternary operator |ICE with vector operation |and vector operation | --- Comment #1 from Nils 2013-07-12 19:31:20 PDT --- Looks like the ternary operator is innocent. Another trigger: --- cat > test2.d << code void main() { double[2] v, x; double[2] r = v[] * x[0]; } code dmd -c -o- test2.d --- dmd: arrayop.c:525: virtual void BinExp::buildArrayIdent(OutBuffer*, Expressions*): Assertion `0' failed. Aborted (core dumped) --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 00:32:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 07:32:44 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #28 from Walter Bright 2013-07-13 00:32:38 PDT --- (In reply to comment #2) > (In reply to comment #1) > > > What's the pattern that DMD recognizes for rotate instructions? > > Walter offers this example of recognizable rotation: Ack, the example is bad. This one generates rol/ror: ----------- void test(int shift) { uint a = 7; uint r; r = (a >> shift) | (a << (int.sizeof * 8 - shift)); assert(r == 0x8000_0003); r = (r << shift) | (r >> (int.sizeof * 8 - shift)); assert(r == 7); } ----------- compiling with -O: _D3foo4testFiZv comdat assume CS:_D3foo4testFiZv L0: push EAX mov EDX,7 mov ECX,EAX push EAX ror EDX,CL cmp EDX,080000003h push EBX mov 4[ESP],EDX je L22 mov EAX,6 call near ptr _D3foo8__assertFiZv L22: mov EBX,4[ESP] mov ECX,8[ESP] rol EBX,CL cmp EBX,7 je L3B mov EAX,8 call near ptr _D3foo8__assertFiZv L3B: pop EBX add ESP,8 ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 00:35:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 07:35:47 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #29 from Walter Bright 2013-07-13 00:35:45 PDT --- Fix test case: https://github.com/D-Programming-Language/dmd/pull/2341 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 02:37:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 09:37:40 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #30 from bearophile_hugs at eml.cc 2013-07-13 02:37:33 PDT --- (In reply to comment #28) > Ack, the example is bad. This one generates rol/ror: For normal D programmers it's easy to write D "rotation" code that the D compiler doesn't recognize. So here I have proposed to add two standard rol/ror template functions to core.bitop that all D programmers can use safely and all D compilers can optimize well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 02:59:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 09:59:21 +0000 (UTC) Subject: [Issue 10161] std.datetime unittest failure "Libya Standard Time" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10161 Rainer Schuetze changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagitario at gmx.de --- Comment #1 from Rainer Schuetze 2013-07-13 02:59:19 PDT --- Probably related to this update: http://support.microsoft.com/kb/2794119 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 03:14:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 10:14:40 +0000 (UTC) Subject: [Issue 10627] New: Array ops with fixed sized arrays lose their length at function return point Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10627 Summary: Array ops with fixed sized arrays lose their length at function return point Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-13 03:14:38 PDT --- alias Foo = float[2]; Foo bar(Foo x, Foo y) { Foo z = x[] + y[]; // OK return x[] + y[]; // error } void main() {} DMD 2.064alpha gives: test.d(4): Error: cannot implicitly convert expression (x[] + y[]) of type float[] to float[2u] See also Issue 10523 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 04:26:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 11:26:15 +0000 (UTC) Subject: [Issue 10612] Regression (2.064 HEAD): ICE on using enum as hash key with mutual module imports In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10612 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-13 04:26:12 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/797832d6d2537f1e75f58550b55bdcc6fdef32a9 fix issue 10612 - ICE on using enum as hash key with mutual module imports https://github.com/D-Programming-Language/dmd/commit/a608afd9b4d756bb4be3f5ebfa8bb471176be04d Merge pull request #2336 from hpohl/10612 [REG2.064a] fix issue 10612 - ICE on using enum as hash key with mutual module imports -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 04:26:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 11:26:31 +0000 (UTC) Subject: [Issue 10612] Regression (2.064 HEAD): ICE on using enum as hash key with mutual module imports In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10612 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 05:32:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 12:32:06 +0000 (UTC) Subject: [Issue 10628] New: [REG2.063] spurious deprecation warning Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10628 Summary: [REG2.063] spurious deprecation warning Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic, wrong-code Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-13 05:32:04 PDT --- From: http://d.puremagic.com/issues/show_bug.cgi?id=10577#c5 Reduced test case: abstract class base { static if (! __traits(isVirtualMethod, foo)) { } private bool _bar; public void foo(); } class derived: base // line 44 { public override void foo() {} } void main() { printf("vtbl = %d\n", typeid(derived).vtbl.length - typeid(Object).vtbl.length); // With 2.062, prints "1" // With 2.063, prints "2" } Problematic deprecation message: test.d(44): Deprecation: class test.derived use of test.base.foo() hidden by derived is deprecated. Use 'alias base.foo foo;' to introduce base class overload set. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 05:33:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 12:33:06 +0000 (UTC) Subject: [Issue 10577] 2.063 Mixin Regression (works with 2.062) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10577 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #6 from Kenji Hara 2013-07-13 05:33:04 PDT --- (In reply to comment #5) > Slightly different test case. But since this too is related, I am re-opening > the same bug. Let me know if I should instead be opening a separate bug for > this. > > With this code, I am getting a *spurious* deprecation warning (compiles without > warning with version 2.062). I filed the issue in separate bug 10628. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 05:49:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 12:49:03 +0000 (UTC) Subject: [Issue 10628] [REG2.063] spurious "hidden by" deprecation warning In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10628 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[REG2.063] spurious |[REG2.063] spurious "hidden |deprecation warning |by" deprecation warning --- Comment #1 from Kenji Hara 2013-07-13 05:49:02 PDT --- https://github.com/D-Programming-Language/dmd/pull/2344 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 06:35:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 13:35:48 +0000 (UTC) Subject: [Issue 4850] std.conv.to isn't pure In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4850 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #5 from Kenji Hara 2013-07-13 06:35:44 PDT --- In 2.064a, the issue has been fixed. https://github.com/D-Programming-Language/phobos/pull/1337 https://github.com/D-Programming-Language/phobos/commit/4da1639c98cb73d07858b17c2d225063889e4700 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 06:42:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 13:42:17 +0000 (UTC) Subject: [Issue 9560] Too many error messages from std.array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9560 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #1 from Kenji Hara 2013-07-13 06:42:15 PDT --- With 2.064a (a608afd9b4d756bb4be3f5ebfa8bb471176be04d): test.d(3): Error: pure function 'D main' cannot call impure function 'std.algorithm.sort!("a < b", cast(SwapStrategy)0, int[]).sort' There's no error message flood. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 06:48:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 13:48:26 +0000 (UTC) Subject: [Issue 9725] std.string.format does wasteful UTF decoding In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9725 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #5 from Kenji Hara 2013-07-13 06:48:25 PDT --- Fixed in 2.063. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 07:05:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 14:05:43 +0000 (UTC) Subject: [Issue 10629] New: [ICE](dt.c 106) with void array Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10629 Summary: [ICE](dt.c 106) with void array Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-13 07:05:43 PDT --- class Foo {} struct Bar { void[__traits(classInstanceSize, Foo)] x; } void main() { Bar f; } It generates an ICE and the first error message has no line number, dmd 2.064alpha: Error: void does not have a default initializer Internal error: backend\dt.c 106 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 07:54:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 14:54:56 +0000 (UTC) Subject: [Issue 10626] ICE with vector operation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10626 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |yebblies at gmail.com AssignedTo|nobody at puremagic.com |yebblies at gmail.com --- Comment #2 from yebblies 2013-07-14 00:54:52 EST --- https://github.com/D-Programming-Language/dmd/pull/2345 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 08:27:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 15:27:42 +0000 (UTC) Subject: [Issue 10630] New: Structs with disabled default construction can't be used as `out` parameters Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10630 Summary: Structs with disabled default construction can't be used as `out` parameters Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: verylonglogin.reg at gmail.com --- Comment #0 from Denis Shelomovskij 2013-07-13 19:27:41 MSD --- --- struct S { @disable this(); } void f(out S) { } // no errors here void main() { S s = S.init; f(s); // Error: struct main.S default construction is disabled } --- As disabled default construction may be also interpreded as "not for `out` parameters" (and yes, it breaks the code) it is absolutely inconsistent that the error is in function usage but not in the declaration. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 08:45:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 15:45:10 +0000 (UTC) Subject: [Issue 10631] New: Module import pull lots of symbols Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10631 Summary: Module import pull lots of symbols Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: link-failure Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: verylonglogin.reg at gmail.com --- Comment #0 from Denis Shelomovskij 2013-07-13 19:45:08 MSD --- This code used to work allowing usage of stuff like `min` where no D runtime functions are used: --- import std.algorithm; extern(C) void main() { } --- Current OPTLINK output: --- OPTLINK (R) for Win32 Release 8.00.13 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __d_arrayappendT Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D12TypeInfo_Aya6__initZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __d_throwc Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std3utf12isValidDcharFNaNbNfwZb Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std3utf12UTFException7__ClassZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __d_newclass Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std3utf7__arrayZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std3utf12UTFException6__ctorMFNaNfAyakAyakC6object9ThrowableZC3std3utf12UTFException Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std3utf6encodeFNaNfKG4awZk Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std4conv7__arrayZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std6format7__arrayZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std5array7__arrayZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __d_allocmemory Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D16TypeInfo_Pointer6__vtblZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D15TypeInfo_Struct6__vtblZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __d_newitemT Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D4core6memory2GC6qallocFNaNbkkZS4core6memory8BlkInfo_ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D4core6memory2GC6extendFNaNbPvkkZk Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __d_arraycopy Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std6format15FormatException6__ctorMFNaNbNfAyaAyakC6object9ThrowableZC3std6format15FormatException Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std6format15FormatException7__ClassZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D11TypeInfo_Aa6__initZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __d_arraysetcapacity Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std4conv13ConvException6__ctorMFNaNbNfAyaAyakZC3std4conv13ConvException Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std4conv13ConvException7__ClassZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std4conv21ConvOverflowException6__ctorMFNaNbNfAyaAyakZC3std4conv21ConvOverflowException Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std4conv21ConvOverflowException7__ClassZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std5ascii7isDigitFNaNbNfwZb Release\test_d2.obj(test_d2) Error 42: Symbol Undefined __adDupT Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D14TypeInfo_Array6__vtblZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D10TypeInfo_a6__initZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D14TypeInfo_Const6__vtblZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D9Exception7__ClassZ Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D6object9Exception6__ctorMFNaNbNfAyaAyakC6object9ThrowableZC9Exception Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std9exception7bailOutFNaNfAyakxAaZv Release\test_d2.obj(test_d2) Error 42: Symbol Undefined _D3std9algorithm12__ModuleInfoZ --- errorlevel 36 --- (`betterC` flag removes one undefined symbol) This forces one to copy/paste all the functionality for runtime-less applications. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 08:57:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 15:57:48 +0000 (UTC) Subject: [Issue 9578] "is a nested function and cannot be accessed from" problem In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9578 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-13 08:57:46 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/05538fe8fc62333b59a06fd0c03c5b9d4a6b47ae Remove bug 9578 workaround Because the compiler bug was fixed recently. --- Revert "Merge pull request #1178 from denis-sh/add-Issue-9578-workaround-to-`std.algorithm.all`" This reverts commit 8dbfc1a7382792e039c8f1d7f5f5232279dead04, reversing changes made to 93c724f2a36a798985dc1d82b050899455c8de4c. https://github.com/D-Programming-Language/phobos/commit/0478579e89e6e2ee8b0f7b2027c3464177867fd0 Merge pull request #1406 from 9rnsr/remove9578wa Remove bug 9578 workaround -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 09:06:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 16:06:44 +0000 (UTC) Subject: [Issue 10632] New: [ICE](glue.c line 1227) With inlining and tuples Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10632 Summary: [ICE](glue.c line 1227) With inlining and tuples Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-13 09:06:42 PDT --- import std.typecons: Tuple; struct Foo {} alias Bar = Tuple!(Foo); Bar spam() { Bar y; y = spam(); return y; } void main() {} dmd 2.064alpha gives, if I compile with -inline: Assertion failure: '0' on line 1227 in file 'glue.c' Maybe it's a regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 09:36:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 16:36:34 +0000 (UTC) Subject: [Issue 10633] New: Win64: wrong codegen with %= Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10633 Summary: Win64: wrong codegen with %= Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-13 09:36:33 PDT --- This code crashes when compiled for win64: struct TimeOfDay { void roll(int value) { value %= 60; auto newVal = _seconds + value; if(newVal < 0) newVal += 60; else if(newVal >= 60) newVal -= 60; _seconds = cast(ubyte)newVal; } ubyte _seconds; } void main() { TimeOfDay tod = TimeOfDay(0); tod.roll(-1); assert(tod._seconds == 59); } generated asm for roll: _D4test9TimeOfDay4rollMFiZv: 0000000000000000: 55 push rbp 0000000000000001: 48 8B EC mov rbp,rsp 0000000000000004: 48 83 EC 18 sub rsp,18h 0000000000000008: 53 push rbx 0000000000000009: 48 89 4D 10 mov qword ptr [rbp+10h],rcx 000000000000000D: 89 55 18 mov dword ptr [rbp+18h],edx 0000000000000010: 48 83 7D 10 00 cmp qword ptr [rbp+10h],0 0000000000000015: 75 1D jne 0000000000000034 0000000000000017: 41 B8 03 00 00 00 mov r8d,3 000000000000001D: 48 8D 15 00 00 00 lea rdx,[_TMP1] 00 0000000000000024: 48 8D 0D 00 00 00 lea rcx,[_TMP3] 00 000000000000002B: 48 83 EC 20 sub rsp,20h 000000000000002F: E8 00 00 00 00 call _d_assert_msg 0000000000000034: 41 B9 3C 00 00 00 mov r9d,3Ch 000000000000003A: 8B 45 18 mov eax,dword ptr [rbp+18h] 000000000000003D: 99 cdq 000000000000003E: 41 F7 F9 idiv eax,r9d 0000000000000041: 89 55 18 mov dword ptr [rbp+18h],edx 0000000000000044: 48 8B 5D 10 mov rbx,qword ptr [rbp+10h] 0000000000000048: 0F B6 03 movzx eax,byte ptr [rbx] 000000000000004B: 03 C2 add eax,edx 000000000000004D: 89 45 F8 mov dword ptr [rbp-8],eax 0000000000000050: 85 C0 test eax,eax 0000000000000052: 79 04 jns 0000000000000058 0000000000000054: 01 CD add ebp,ecx 0000000000000056: EB 08 jmp 0000000000000060 0000000000000058: 83 7D F8 3C cmp dword ptr [rbp-8],3Ch 000000000000005C: 7C 02 jl 0000000000000060 000000000000005E: 29 CD sub ebp,ecx 0000000000000060: 8A 55 F8 mov dl,byte ptr [rbp-8] 0000000000000063: 48 8B 4D 10 mov rcx,qword ptr [rbp+10h] 0000000000000067: 88 11 mov byte ptr [rcx],dl 0000000000000069: 5B pop rbx 000000000000006A: 48 8D 65 00 lea rsp,[rbp] 000000000000006E: 5D pop rbp 000000000000006F: C3 ret Notice that the add/sub at offsets 54/5e write to ebp, but the variable is in [rbp-8]. Exchanging "value %= 60;" with "value = value % 60;" fixes the problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 10:25:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 17:25:30 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #31 from hsteoh at quickfur.ath.cx 2013-07-13 10:25:27 PDT --- I still can't get it to work. I copied Walter's code exactly, compiled with dmd -O (from DMD git HEAD) and here's the disassembly: 0000000000416854 <_D4test4testFiZv>: 416854: 55 push %rbp 416855: 48 8b ec mov %rsp,%rbp 416858: 48 83 ec 20 sub $0x20,%rsp 41685c: 53 push %rbx 41685d: 41 54 push %r12 41685f: 89 7d f8 mov %edi,-0x8(%rbp) 416862: 41 bc 07 00 00 00 mov $0x7,%r12d 416868: 48 89 f9 mov %rdi,%rcx 41686b: 41 d3 ec shr %cl,%r12d 41686e: b8 07 00 00 00 mov $0x7,%eax 416873: 48 ba 20 00 00 00 00 movabs $0x20,%rdx 41687a: 00 00 00 41687d: 48 63 d9 movslq %ecx,%rbx 416880: 48 2b d3 sub %rbx,%rdx 416883: 48 89 d1 mov %rdx,%rcx 416886: d3 e0 shl %cl,%eax 416888: 44 0b e0 or %eax,%r12d 41688b: 41 81 fc 03 00 00 80 cmp $0x80000003,%r12d 416892: 48 89 8d e8 ff ff ff mov %rcx,-0x18(%rbp) 416899: 74 0a je 4168a5 <_D4test4testFiZv+0x51> 41689b: bf 06 00 00 00 mov $0x6,%edi 4168a0: e8 37 00 00 00 callq 4168dc <_D4test8__assertFiZv> 4168a5: 41 8b c4 mov %r12d,%eax 4168a8: 8b 4d f8 mov -0x8(%rbp),%ecx 4168ab: d3 e0 shl %cl,%eax 4168ad: 41 8b d4 mov %r12d,%edx 4168b0: 48 8b 8d e8 ff ff ff mov -0x18(%rbp),%rcx 4168b7: d3 ea shr %cl,%edx 4168b9: 0b c2 or %edx,%eax 4168bb: 83 f8 07 cmp $0x7,%eax 4168be: 74 0a je 4168ca <_D4test4testFiZv+0x76> 4168c0: bf 08 00 00 00 mov $0x8,%edi 4168c5: e8 12 00 00 00 callq 4168dc <_D4test8__assertFiZv> 4168ca: 41 5c pop %r12 4168cc: 5b pop %rbx 4168cd: 48 8b e5 mov %rbp,%rsp 4168d0: 5d pop %rbp 4168d1: c3 retq I don't understand what I'm doing wrong. Is this a platform-specific issue? I'm running Linux/x86_64. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 10:45:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 17:45:23 +0000 (UTC) Subject: [Issue 10634] New: Win64: wrong codegen with .int of small structs Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10634 Summary: Win64: wrong codegen with .int of small structs Product: D Version: D1 & D2 Platform: x86_64 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-13 10:45:22 PDT --- This extract from datetime fires the assertion: struct TimeOfDay { ubyte h, m, s; } __gshared byte glob; struct DateTime { this(ubyte _d, ubyte _m, ubyte _y, TimeOfDay _tod = TimeOfDay.init) { d = _d; m = _m; y = _y; tod = _tod; } TimeOfDay tod; ubyte d, m, y; } void main() { glob = 123; DateTime date1 = DateTime(0, 0, 0); DateTime date2; assert(date1 == date2); } Here is the disassembly: _D4test8DateTime6__ctorMFNchhhS4test9TimeOfDayZS4test8DateTime: 0000000000000000: 55 push rbp 0000000000000001: 48 8B EC mov rbp,rsp 0000000000000004: 8A 45 30 mov al,byte ptr [rbp+30h] 0000000000000007: 88 41 03 mov byte ptr [rcx+3],al 000000000000000A: 44 88 49 04 mov byte ptr [rcx+4],r9b 000000000000000E: 44 88 41 05 mov byte ptr [rcx+5],r8b 0000000000000012: 89 11 mov dword ptr [rcx],edx 0000000000000014: 48 89 C8 mov rax,rcx 0000000000000017: 5D pop rbp 0000000000000018: C3 ret _Dmain: 0000000000000000: 55 push rbp 0000000000000001: 48 8B EC mov rbp,rsp 0000000000000004: 48 83 EC 20 sub rsp,20h 0000000000000008: 56 push rsi 0000000000000009: 57 push rdi 000000000000000A: C6 05 00 00 00 00 mov byte ptr [_D4test4globg],7Bh 7B 0000000000000011: 48 8D 45 E8 lea rax,[rbp-18h] 0000000000000015: 48 31 C9 xor rcx,rcx 0000000000000018: 89 08 mov dword ptr [rax],ecx 000000000000001A: 66 89 48 04 mov word ptr [rax+4],cx 000000000000001E: 48 83 EC 08 sub rsp,8 0000000000000022: 51 push rcx 0000000000000023: 44 8A C9 mov r9b,cl 0000000000000026: 4D 89 C8 mov r8,r9 0000000000000029: 44 88 45 F0 mov byte ptr [rbp-10h],r8b 000000000000002D: 44 88 45 F1 mov byte ptr [rbp-0Fh],r8b 0000000000000031: 44 88 45 F2 mov byte ptr [rbp-0Eh],r8b 0000000000000035: 8B 55 F0 mov edx,dword ptr [rbp-10h] 0000000000000038: 48 89 C1 mov rcx,rax 000000000000003B: 48 83 EC 20 sub rsp,20h 000000000000003F: E8 00 00 00 00 call _D4test8DateTime6__ctorMFNchh hS4test9TimeOfDayZS4test8DateTime 0000000000000044: 48 83 C4 30 add rsp,30h 0000000000000048: 48 8D 45 F8 lea rax,[rbp-8] 000000000000004C: 4D 31 C9 xor r9,r9 000000000000004F: 44 89 08 mov dword ptr [rax],r9d 0000000000000052: 66 44 89 48 04 mov word ptr [rax+4],r9w 0000000000000057: 48 8D 75 E8 lea rsi,[rbp-18h] 000000000000005B: 48 89 C7 mov rdi,rax 000000000000005E: 48 B9 06 00 00 00 mov rcx,6 00 00 00 00 0000000000000068: 33 C0 xor eax,eax 000000000000006A: F3 A6 repe cmps byte ptr [rsi],byte ptr [rdi] 000000000000006C: 74 12 je 0000000000000080 000000000000006E: B9 1B 00 00 00 mov ecx,1Bh 0000000000000073: 48 83 EC 20 sub rsp,20h 0000000000000077: E8 00 00 00 00 call _D4test8__assertFiZv 000000000000007C: 48 83 C4 20 add rsp,20h 0000000000000080: 31 C0 xor eax,eax 0000000000000082: 5F pop rdi 0000000000000083: 5E pop rsi 0000000000000084: 48 8D 65 00 lea rsp,[rbp] 0000000000000088: 5D pop rbp 0000000000000089: C3 ret it shows that the init-value is prepared with 3 byte writes, but a 32-bit word is read to be passed in edx. It then writes all 4 bytes into the DateTime struct overwriting the following element with garbage. If the initializer is taking from the BSS segment, it is the global variable that is read as the 4th byte. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 11:09:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 18:09:49 +0000 (UTC) Subject: [Issue 10635] New: Error: cannot use array to initialize S Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10635 Summary: Error: cannot use array to initialize S Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: kozzi11 at gmail.com --- Comment #0 from Daniel Kozak 2013-07-13 11:09:48 PDT --- struct S { string str; static S opCall(string[] v) { S s; s.str = v[0]; return s; } static S opCall(string[string] v) { S s; s.str = v.keys[0]; return s; } } S s = ["getnonce"]; // this works S s = ["getnonce" : "str"]; // this doesnt work -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 12:41:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 19:41:28 +0000 (UTC) Subject: [Issue 10141] wrong error message with Tuple!(int) : Error: static assert "Cannot put a char[] into a Appender!(string)" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10141 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henning at still-hidden.de Severity|normal |critical --- Comment #4 from Henning Pohl 2013-07-13 12:41:26 PDT --- A bit more reduced: --- import std.typecons; lets cause_an_error; Tuple!int tf; --- I have seen this bug hiding other erros, so only the "static assert "Cannot put a char[] into a Appender!(string)"" error and the instantiation trace shows up. This becomes really really bad in big code bases. I've experienced this multiple times. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 12:54:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 19:54:18 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #32 from Walter Bright 2013-07-13 12:54:15 PDT --- (In reply to comment #31) > I don't understand what I'm doing wrong. Is this a platform-specific issue? I'm > running Linux/x86_64. It works with 32 bit code generation, not with 64. I didn't realize that. I'll look into fixing it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 13:26:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 20:26:21 +0000 (UTC) Subject: [Issue 10141] wrong error message with Tuple!(int) : Error: static assert "Cannot put a char[] into a Appender!(string)" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10141 --- Comment #5 from Andrej Mitrovic 2013-07-13 13:26:19 PDT --- (In reply to comment #4) > This becomes really really bad in big code bases. I've > experienced this multiple times. Yeah me too, lately quite often. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 13:39:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 20:39:23 +0000 (UTC) Subject: [Issue 10629] [ICE](dt.c 106) with void array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10629 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-13 13:39:21 PDT --- This is fixed by https://github.com/D-Programming-Language/dmd/pull/2154. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 13:41:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 20:41:14 +0000 (UTC) Subject: [Issue 10636] New: Vector calling convention for D? Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10636 Summary: Vector calling convention for D? Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-13 13:41:13 PDT --- VS2013 designers have added a new calling convention, that allows to pass SIMD registers to functions avoiding the stack in most cases: http://blogs.msdn.com/b/vcblog/archive/2013/07/12/introducing-vector-calling-convention.aspx An example D program: import core.stdc.stdio, core.simd; struct Particle { float4 x, y; } Particle addParticles(in Particle p1, in Particle p2) pure nothrow { return Particle(p1.x + p2.x, p1.y + p2.y); } void main() { auto p1 = Particle([1, 2, 3, 4], [10, 20, 30, 40]); printf("%f %f %f %f %f %f %f %f\n", p1.x.array[0], p1.x.array[1], p1.x.array[2], p1.x.array[3], p1.y.array[0], p1.y.array[1], p1.y.array[2], p1.y.array[3]); auto p2 = Particle([100, 200, 300, 400], [1000, 2000, 3000, 4000]); printf("%f %f %f %f %f %f %f %f\n", p2.x.array[0], p2.x.array[1], p2.x.array[2], p2.x.array[3], p2.y.array[0], p2.y.array[1], p2.y.array[2], p2.y.array[3]); auto p3 = addParticles(p1, p2); printf("%f %f %f %f %f %f %f %f\n", p3.x.array[0], p3.x.array[1], p3.x.array[2], p3.x.array[3], p3.y.array[0], p3.y.array[1], p3.y.array[2], p3.y.array[3]); } Comping that code with the ldc2 v.0.11.0 on Windows 32bit with: ldc2 -O5 -disable-inlining -release -vectorize-slp -vectorize-slp-aggressive -output-s test.d It outputs the X86 asm: __D4test12addParticlesFNaNbxS4test8ParticlexS4test8ParticleZS4test8Particle: pushl %ebp movl %esp, %ebp andl $-16, %esp subl $16, %esp movaps 40(%ebp), %xmm0 movaps 56(%ebp), %xmm1 addps 8(%ebp), %xmm0 addps 24(%ebp), %xmm1 movups %xmm1, 16(%eax) movups %xmm0, (%eax) movl %ebp, %esp popl %ebp ret $64 __Dmain: ... movaps 160(%esp), %xmm0 movaps 176(%esp), %xmm1 movaps %xmm1, 48(%esp) movaps %xmm0, 32(%esp) movaps 128(%esp), %xmm0 movaps 144(%esp), %xmm1 movaps %xmm1, 16(%esp) movaps %xmm0, (%esp) leal 96(%esp), %eax calll __D4test12addParticlesFNaNbxS4test8ParticlexS4test8ParticleZS4test8Particle subl $64, %esp movss 96(%esp), %xmm0 movss 100(%esp), %xmm1 movss 104(%esp), %xmm2 movss 108(%esp), %xmm3 movss 112(%esp), %xmm4 movss 116(%esp), %xmm5 movss 120(%esp), %xmm6 movss 124(%esp), %xmm7 cvtss2sd %xmm7, %xmm7 movsd %xmm7, 60(%esp) cvtss2sd %xmm6, %xmm6 movsd %xmm6, 52(%esp) cvtss2sd %xmm5, %xmm5 movsd %xmm5, 44(%esp) cvtss2sd %xmm4, %xmm4 movsd %xmm4, 36(%esp) cvtss2sd %xmm3, %xmm3 movsd %xmm3, 28(%esp) cvtss2sd %xmm2, %xmm2 movsd %xmm2, 20(%esp) cvtss2sd %xmm1, %xmm1 movsd %xmm1, 12(%esp) cvtss2sd %xmm0, %xmm0 movsd %xmm0, 4(%esp) movl $_.str3, (%esp) calll ___mingw_printf xorl %eax, %eax movl %ebp, %esp popl %ebp ret As shown in that article, with a vector calling convention to set the arguments of addParticles it needs only four movaps (instead of eigth and the leal). With the vectr calling convention the body of addParticles gets short, because all the needed operands are already in xmm registers. Probably the code of addParticles becomes only two addps, a ret and maybe two movaps to put the result in the right output registers. D is meant to be useful for people that write fast video games, or other numerical code, and both use plenty of SIMD code. So I think adding such optimization can be useful. But I can't estimate how much advantage it's going to give, benchmarks are needed. They write: >Today on AMD64 target, passed by value vector arguments (such as __m128/__m256/) must be turned into a passed by address of a temporary buffer (i.e. $T1, $T2, $T3 in the figure above) allocated in caller's local stack as shown in the figure above. We have been receiving increasing concerns about this inefficiency in past years, especially from game, graphic, video/audio, and codec domains. A concrete example is MS XNA library in which passing vector arguments is a common pattern in many APIs of XNAMath library. The inefficiency will be intensified on upcoming AVX2/AVX3 and future processors with wider vector registers.< On the other hand small functions get inlined, and introducing a new calling convention has a disadvantage, as comment by Iain Buclaw: > I'd vote for not adding more fluff which makes ABI differences > between compilers greater. But it certainly looks like if would > be useful if you wish to save the time taken to copy the vector > from XMM registers onto the stack and back again when passing > values around. Maybe such vector calling convention will become more standard in future, as it seems an useful improvement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 14:27:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 13 Jul 2013 21:27:56 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #33 from hsteoh at quickfur.ath.cx 2013-07-13 14:27:53 PDT --- Interesting. Running dmd -m32 -O works, produces the rotate instructions. For some reason, I still can't coax gdc to do this. I've tried all combinations of -O, -O2, -O3 and -m32 , -m64, and it still only produces shift + bitwise OR. Any clues, Iain? :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 20:27:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 03:27:39 +0000 (UTC) Subject: [Issue 1982] [CTFE] Problems with compile-time null In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1982 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 22:32:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 05:32:09 +0000 (UTC) Subject: [Issue 7988] [CTFE] CTFE return values should be allowed in compile-time expressions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7988 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 22:33:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 05:33:07 +0000 (UTC) Subject: [Issue 8253] CTFE ICE: calling of member function of non-CTFE class variable In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8253 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 22:34:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 05:34:32 +0000 (UTC) Subject: [Issue 8285] Issue with slice returned from CTFE function In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8285 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 23:00:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 06:00:58 +0000 (UTC) Subject: [Issue 6169] [CTFE] pure functions cannot compute constants using functions not marked as pure In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6169 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 23:01:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 06:01:33 +0000 (UTC) Subject: [Issue 10022] Importing packages In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10022 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #9 from yebblies 2013-07-14 16:01:31 EST --- This has been implemented. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 23:02:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 06:02:16 +0000 (UTC) Subject: [Issue 6320] non-pure constructor can be called using new In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6320 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WORKSFORME --- Comment #1 from yebblies 2013-07-14 16:02:16 EST --- This has since been fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 23:04:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 06:04:47 +0000 (UTC) Subject: [Issue 8096] Useless error when gagged error destroys type of nested union In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8096 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #1 from yebblies 2013-07-14 16:04:46 EST --- Seems to work now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 23:48:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 06:48:32 +0000 (UTC) Subject: [Issue 10141] wrong error message with Tuple!(int) : Error: static assert "Cannot put a char[] into a Appender!(string)" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10141 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #6 from Kenji Hara 2013-07-13 23:48:30 PDT --- https://github.com/D-Programming-Language/dmd/pull/2346 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 23:52:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 06:52:47 +0000 (UTC) Subject: [Issue 6320] non-pure constructor can be called using new In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6320 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WORKSFORME |DUPLICATE --- Comment #2 from Kenji Hara 2013-07-13 23:52:46 PDT --- Fixed in 2.064a. *** This issue has been marked as a duplicate of issue 10254 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 13 23:52:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 06:52:48 +0000 (UTC) Subject: [Issue 10254] Purity correctness is broken with constructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10254 --- Comment #6 from Kenji Hara 2013-07-13 23:52:46 PDT --- *** Issue 6320 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: ------- From d-bugmail at puremagic.com Sun Jul 14 01:56:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 08:56:29 +0000 (UTC) Subject: [Issue 10607] DirEntry has no constructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10607 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-14 01:56:18 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/c140217d25efa1168299d069abe2a9eda10eeabc Fix Issue 10607 - DirEntry has no constructor http://d.puremagic.com/issues/show_bug.cgi?id=10607 Fixes: auto a = DirEntry("path"); //Correctly works Simplified code a little bit (Axed _init) Improved FileException usage -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 01:56:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 08:56:39 +0000 (UTC) Subject: [Issue 10621] dirEntry is (now) useless In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10621 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-14 01:56:38 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/f7b417192a335fa037ea7e66d37372ddd8d36ac5 Fix Issue 10621 - dirEntry is (now) useless -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 02:44:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 09:44:56 +0000 (UTC) Subject: [Issue 10637] New: minimallyInitializedArray: postblit on non-initialized... Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10637 Summary: minimallyInitializedArray: postblit on non-initialized... Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-14 02:44:54 PDT --- ...which can trigger faults in destructor. No construction should occur at all in minimallyInitializedArray anyways. //---- static struct S { static struct I{int i; alias i this;} int* p; this() @disable; this(int i) { p = &(new I(i)).i; } this(this) { p = &(new I(*p)).i; //HERE } ~this() { assert(p != null); //THERE } } auto a = minimallyInitializedArray!(S[])(1); //---- The above should work. It currently cores at HERE. Skipping HERE makes it assert at THERE. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 02:47:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 09:47:29 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #34 from Iain Buclaw 2013-07-14 02:47:24 PDT --- (In reply to comment #33) > Interesting. Running dmd -m32 -O works, produces the rotate instructions. > > For some reason, I still can't coax gdc to do this. I've tried all combinations > of -O, -O2, -O3 and -m32 , -m64, and it still only produces shift + bitwise OR. > Any clues, Iain? :) Works for me (gcc vanilla development) - so I'm shrugging my shoulders on this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 03:18:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 10:18:03 +0000 (UTC) Subject: [Issue 10589] GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10589 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|druntime |websites Severity|major |enhancement --- Comment #4 from monarchdodra at gmail.com 2013-07-14 03:18:00 PDT --- (In reply to comment #3) > >Is the memory layout for the APPENDABLE data documented somewhere, or are these > just reverse-engineered magic numbers? > > There is some description in rt/lifetime.d starting around line 200. > > >Nope (I think). Length is carried in the slice, not the block. > > Block only contains capacity/used info. > > Sorry, I meant the "used" info that must be reset. > > >In particular, the magic numbers should be user accessible via manifest > > constants, or functions, so as to not have to guess/reverse engineer them. > > The constants are defined privately in lifetime.d as SMALLPAD, MEDPAD and > LARGEPAD. I suspect the trailing byte for large arrays is added so that > arr[$..$] always points into the same memory block, and not the next one. Ok. I have just some tiny questions left, if you'd care to instruct me: 1. Why does the "Place at beginning" scheme start at 2K bytes, when a page is 4K byte? 2. Why is the padding 16 bytes? You'd think 8 is enough...? Is there a reason, or is it just "future proofing"? I'll write up the info acquired and update the doc. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 03:32:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 10:32:14 +0000 (UTC) Subject: [Issue 10589] GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10589 --- Comment #5 from Rainer Schuetze 2013-07-14 03:32:13 PDT --- (In reply to comment #4) > Ok. I have just some tiny questions left, if you'd care to instruct me: > 1. Why does the "Place at beginning" scheme start at 2K bytes, when a page is > 4K byte? Allocation sizes below 4k are rounded up to the next power of 2, so if the allocation is larger than 2048, a full page is used by the GC. The array functions then assume that extending is possible and place information at the start of the buffer. All this is very specific to the currnt GC implementation. > 2. Why is the padding 16 bytes? You'd think 8 is enough...? Is there a reason, > or is it just "future proofing"? It is necessary to support alignment attributes in arrays of structs (at least up to 16) or alignment for SIMD vectors. > > I'll write up the info acquired and update the doc. Thanks. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 03:45:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 10:45:05 +0000 (UTC) Subject: [Issue 9803] minimallyInitializedArray fails past "1D" depth In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9803 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|nobody at puremagic.com |monarchdodra at gmail.com --- Comment #2 from monarchdodra at gmail.com 2013-07-14 03:45:04 PDT --- https://github.com/D-Programming-Language/phobos/pull/1413 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 03:45:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 10:45:44 +0000 (UTC) Subject: [Issue 10637] minimallyInitializedArray: postblit on non-initialized... In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10637 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|nobody at puremagic.com |monarchdodra at gmail.com --- Comment #1 from monarchdodra at gmail.com 2013-07-14 03:45:43 PDT --- https://github.com/D-Programming-Language/phobos/pull/1413 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 04:00:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 11:00:03 +0000 (UTC) Subject: [Issue 8860] DMD crashes in post-contract of auto function In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8860 kekeniro2 at yahoo.co.jp changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #2 from kekeniro2 at yahoo.co.jp 2013-07-14 04:00:01 PDT --- *** This issue has been marked as a duplicate of issue 10596 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 04:00:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 11:00:04 +0000 (UTC) Subject: [Issue 10596] A method with out contract and auto return type causes segfault In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10596 kekeniro2 at yahoo.co.jp changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kekeniro2 at yahoo.co.jp --- Comment #1 from kekeniro2 at yahoo.co.jp 2013-07-14 04:00:01 PDT --- *** Issue 8860 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: ------- From d-bugmail at puremagic.com Sun Jul 14 04:44:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 11:44:08 +0000 (UTC) Subject: [Issue 10638] New: Assignment can't be used as a condition Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10638 Summary: Assignment can't be used as a condition Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: freeslave93 at gmail.com --- Comment #0 from Roman 2013-07-14 04:44:07 PDT --- Suppose code void main() { int i = 0; if (i = 1) { //...... } } dmd compiler generates error: "assignment cannot be used as a condition, perhaps == was meant?" But next code passed successfully: void main() { if (int i = 1) { //...... } } It's a bit odd that assignment can not be used as condition while declaration can be. It works fine if we replace first code snippet with this: void main() { int i = 0; if (cast(bool)(i = 1)) { //...... } } I guess assignment has no implicit cast to bool, it's weird too. If it's not error, please, explain me the reasons of this restriction. Also dlang.org defines ifStatement as "if ( IfCondition ) ThenStatement", where ifCondition can be Expression (hence AssignExpression too), but it seems it does not work at practice. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 04:48:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 11:48:32 +0000 (UTC) Subject: [Issue 10638] Assignment can't be used as a condition In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10638 9999 changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mailnew4ster at gmail.com --- Comment #1 from 9999 2013-07-14 04:48:30 PDT --- I believe the primary reason is to prevent bugs where == was meant and not =. Usually, what you want to do is: void main() { int i = f(); if (i == 1) { //...... } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 04:58:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 11:58:14 +0000 (UTC) Subject: [Issue 10638] Assignment can't be used as a condition In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10638 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #2 from bearophile_hugs at eml.cc 2013-07-14 04:58:13 PDT --- (In reply to comment #1) > I believe the primary reason is to prevent bugs where == was meant and not =. > Usually, what you want to do is: > > void main() > { > int i = f(); > if (i == 1) > { > //...... > } > } Right. D is working as designed here, it helps avoid bugs. > Also dlang.org defines ifStatement as "if ( IfCondition ) ThenStatement", > where ifCondition can be Expression (hence AssignExpression too), > but it seems it does not work at practice. Then maybe that's what needs fixing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 06:13:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 13:13:55 +0000 (UTC) Subject: [Issue 10639] New: Win64: wrong optimizer codegen with struct literal with complex fields Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10639 Summary: Win64: wrong optimizer codegen with struct literal with complex fields Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-14 06:13:54 PDT --- This source extracted from the phobos unittests: struct S1 { cdouble val; } void formatTest(S1 s, double re, double im) { assert(s.val.re == re); assert(s.val.im == im); } unittest { S1 s = S1(3+2.25i); formatTest(s, 3, 2.25); } void main() {} compile with "dmd -unittest -m64 -O test.d" and run to see the assertions failing. This does not happen with -m32 or without -O. Here is the disassembly of the unittest code: _D4test15__unittestL12_1FZv: 0000000000000000: 55 push rbp 0000000000000001: 48 8B EC mov rbp,rsp 0000000000000004: 48 83 EC 10 sub rsp,10h 0000000000000008: 48 C7 45 F0 00 00 mov qword ptr [rbp-10h],0 00 00 0000000000000010: 48 C7 45 F8 00 00 mov qword ptr [rbp-8],0 00 00 0000000000000018: 4C 8D 45 F0 lea r8,[rbp-10h] 000000000000001C: F2 48 0F 10 0D 00 movsd xmm1,mmword ptr [_TMP3] 00 00 00 0000000000000025: F2 48 0F 10 05 00 movsd xmm0,mmword ptr [_TMP4] 00 00 00 000000000000002E: 48 83 EC 20 sub rsp,20h 0000000000000032: 66 48 0F 7E CA movd rdx,xmm1 0000000000000037: 66 48 0F 7E C1 movd rcx,xmm0 000000000000003C: E8 00 00 00 00 call _D4test10formatTestFS4test2S1ddZv 0000000000000041: 48 83 C4 20 add rsp,20h 0000000000000045: 48 8D 65 00 lea rsp,[rbp] 0000000000000049: 5D pop rbp 000000000000004A: C3 ret The struct literal is initialized with two 0 values at offset 8/10. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 06:29:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 13:29:21 +0000 (UTC) Subject: [Issue 9510] core.bitop.bsr undefined In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9510 Stewart Gordon changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smjg at iname.com Platform|x86_64 |All OS/Version|Mac OS X |All --- Comment #5 from Stewart Gordon 2013-07-14 06:29:19 PDT --- Was happening under Windows as well, and when just unzipping the files and not using an installer. But I remain confused - even if there were obsolete files in the DMD directory, I would think it wouldn't be a problem as there would be no references to these files in the files that actually are being used. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 06:40:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 13:40:40 +0000 (UTC) Subject: [Issue 10524] case and with() isn't work together In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10524 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies at gmail.com --- Comment #1 from yebblies 2013-07-14 23:40:39 EST --- This appears to work with 2.064 alpha on win32. Can anybody reproduce? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 07:12:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 14:12:06 +0000 (UTC) Subject: [Issue 10524] case and with() isn't work together In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10524 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #2 from bearophile_hugs at eml.cc 2013-07-14 07:12:04 PDT --- (In reply to comment #1) > This appears to work with 2.064 alpha on win32. Can anybody reproduce? I can reproduce the segfault at the annotated line: struct S { int field; } void main() { int a = 1; S s; switch (a) with (s) { case 0: s.field = 444; // ok break; case 1: field = 555; // segfault break; default: break; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 07:15:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 14:15:09 +0000 (UTC) Subject: [Issue 10640] New: DMD git-head creates instantly segfaulting executables on Linux 64 Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10640 Summary: DMD git-head creates instantly segfaulting executables on Linux 64 Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: henning at still-hidden.de --- Comment #0 from Henning Pohl 2013-07-14 07:15:08 PDT --- void main() { } dmd main.d ./main Segmentation fault (core dumped) This is caused by commit 16cdeb5438456b8498c258a8a36b9490b. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 07:45:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 14:45:08 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #35 from hsteoh at quickfur.ath.cx 2013-07-14 07:45:05 PDT --- Interestingly, translating the code into C and compiling with gcc 4.8.1 does produce the rotate instructions. But compiling the D version with gdc 4.8 doesn't. I've no idea why. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 08:10:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 15:10:26 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #36 from Iain Buclaw 2013-07-14 08:10:23 PDT --- (In reply to comment #35) > Interestingly, translating the code into C and compiling with gcc 4.8.1 does > produce the rotate instructions. But compiling the D version with gdc 4.8 > doesn't. I've no idea why. You can look at output of -fdump-tree-gimple and compare gcc to gdc generated code. But there should be no difference. :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 08:38:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 15:38:52 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #37 from Iain Buclaw 2013-07-14 08:38:50 PDT --- (In reply to comment #36) > (In reply to comment #35) > > Interestingly, translating the code into C and compiling with gcc 4.8.1 does > > produce the rotate instructions. But compiling the D version with gdc 4.8 > > doesn't. I've no idea why. > > You can look at output of -fdump-tree-gimple and compare gcc to gdc generated > code. > > But there should be no difference. :) gdc 4.9.0 20130707 - produces rol/ror instructions. gdc 4.9.0 20130616 - produces rol/ror instructions. gdc 4.9.0 20130505 - produces shl/shr instructions. Related commits between 10/05 - 14/05. http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=198770 http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=198823 http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=198864 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 09:10:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 16:10:09 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #38 from bearophile_hugs at eml.cc 2013-07-14 09:10:08 PDT --- (In reply to comment #37) > gdc 4.9.0 20130707 - produces rol/ror instructions. > gdc 4.9.0 20130616 - produces rol/ror instructions. > gdc 4.9.0 20130505 - produces shl/shr instructions. I am changing my mind, maybe now I want rol/ror _intrinsics_ in core.bitop... :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 09:32:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 16:32:49 +0000 (UTC) Subject: [Issue 10641] New: array alloc missing APPENDABLE/capacity info Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10641 Summary: array alloc missing APPENDABLE/capacity info Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-14 09:32:48 PDT --- When allocating for an array, only the last dimension will have D-array semantics, with capacity info. When allocating an array via new, ALL dimensions should have appendable info associated. //---- void main() { alias T0 = ushort; auto s0 = new T0[](10); assert(s0.capacity); //OK alias T1 = ushort; auto s1 = new T1[][](10, 10); foreach (e; s1) assert(e.capacity); //OK assert(s1.capacity); //FAILS alias T2 = ushort[]; auto s2 = new T2[][](10, 10); foreach (e; s2) assert(e.capacity); //OK assert(s2.capacity); //FAILS alias T3 = ushort; auto s3 = new T3[][][](10, 10, 10); foreach (e; s3) { foreach (ee; e) assert(ee.capacity); //OK assert(e.capacity); //FAILS } assert(s2.capacity); //FAILS } //---- All the above "FAILS" should pass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 09:41:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 16:41:04 +0000 (UTC) Subject: [Issue 10589] GC.malloc(sz, GC.BlkAttr.APPENDABLE) fails after a certain size In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10589 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #6 from monarchdodra at gmail.com 2013-07-14 09:41:03 PDT --- (In reply to comment #5) > (In reply to comment #4) > > Ok. I have just some tiny questions left, if you'd care to instruct me: > > 1. Why does the "Place at beginning" scheme start at 2K bytes, when a page is > > 4K byte? > > It is necessary to support alignment attributes in arrays of structs (at least > up to 16) or alignment for SIMD vectors. That makes sense I guess. By keeping it to a default 16, it avoids the overhead and complexity of calculating alignement. > > 2. Why is the padding 16 bytes? You'd think 8 is enough...? Is there a reason, > > or is it just "future proofing"? > > Allocation sizes below 4k are rounded up to the next power of 2, so if the > allocation is larger than 2048, a full page is used by the GC. The array > functions then assume that extending is possible and place information at the > start of the buffer. Derp. > All this is very specific to the currnt GC implementation. This. Because it is so specific, I have the feeling that all that has been said here is useless at the end of the day. Only writters of druntime, or users who are writting their own GC, could make use of this. The end user, even a library writer, can't make use of this information. > > I'll write up the info acquired and update the doc. > > Thanks. I think I'll just end up writing that the only thing it does (technically) is set the bit "APPENDABLE" to the memory block. That its exploitation is ultimately implementation dependent. -------- I was able to work around my issue though: By using reserve + assumeSafeAppend, I can get what it was that I wanted to work: Check this out: ushort[] a; a.reserve(20); //GC appendable allocation. a = a.ptr[0 .. 20]; //occupy space assumeSafeAppend(a); //Take ownership of used space assert(a.capcity >= 20); Pretty neat huh? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 09:52:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 16:52:45 +0000 (UTC) Subject: [Issue 10640] DMD git-head creates instantly segfaulting executables on Linux 64 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10640 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Henning Pohl 2013-07-14 09:52:44 PDT --- Nevermid. I needed to rebuild Phobos again after druntime has been rebuilt. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 09:55:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 16:55:39 +0000 (UTC) Subject: [Issue 10642] New: Win64: wrong codegen comparing different sized integer arguments Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 Summary: Win64: wrong codegen comparing different sized integer arguments Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-14 09:55:38 PDT --- Another faiing reduction from the phobos unittests: import std.stdio; void _assertEq (ubyte lhs, short rhs, string msg, string file, size_t line) { immutable result = lhs == rhs; if(!result) { string op = "=="; if(msg.length > 0) writefln(`_assertEq failed: [%s] is not [%s].`, lhs, rhs); else writefln(`_assertEq failed: [%s] is not [%s]: %s`, lhs, rhs, msg); } assert(result); } struct Date { short year; ubyte month; ubyte day; } struct MonthDay { ubyte month; short day; } unittest { static void test(Date date, int day, MonthDay expected, size_t line = __LINE__) { _assertEq(date.day, expected.day, "", __FILE__, line); } test(Date(1999, 1, 1), 1, MonthDay(1,1)); } void main() {} compile with "dmd -O -m64 test.d" produces _assertEq failed: [208] is not [1]: core.exception.AssertError at test(16): Assertion failure Checking the disassembly shows that DIL is read in _assertEq, but never initialized properly. I guess bh was meant instead: _D4test9_assertEqFhsAyaAyamZv: 0000000000000000: 55 push rbp 0000000000000001: 48 8B EC mov rbp,rsp 0000000000000004: 48 83 EC 48 sub rsp,48h 0000000000000008: 56 push rsi 0000000000000009: 57 push rdi 000000000000000A: 41 54 push r12 000000000000000C: 4C 89 45 20 mov qword ptr [rbp+20h],r8 0000000000000010: 4C 89 CE mov rsi,r9 0000000000000013: 8A 7D 30 mov bh,byte ptr [rbp+30h] 0000000000000016: 44 0F B6 D7 movzx r10d,dil 000000000000001A: 44 0F BF DE movsx r11d,si 000000000000001E: 45 3B D3 cmp r10d,r11d 0000000000000021: 41 0F 94 C4 sete r12b 0000000000000025: 45 0F B6 E4 movzx r12d,r12b 0000000000000029: 44 88 65 F0 mov byte ptr [rbp-10h],r12b -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 09:57:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 16:57:16 +0000 (UTC) Subject: [Issue 10642] Win64: wrong codegen comparing different sized integer arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 --- Comment #1 from Rainer Schuetze 2013-07-14 09:57:16 PDT --- Forgot to add that this only happens with optimizations enabled. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 10:28:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 17:28:09 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #39 from Iain Buclaw 2013-07-14 10:28:05 PDT --- (In reply to comment #38) > (In reply to comment #37) > > > gdc 4.9.0 20130707 - produces rol/ror instructions. > > gdc 4.9.0 20130616 - produces rol/ror instructions. > > gdc 4.9.0 20130505 - produces shl/shr instructions. > > I am changing my mind, maybe now I want rol/ror _intrinsics_ in core.bitop... > :-) core.bitop might be a good idea... then I could map the functions to gcc's builtin lrotate and rrotate expressions. :o) Slightly off the mark, but could also do vector rotate intrinsics too... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 10:42:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 17:42:47 +0000 (UTC) Subject: [Issue 10621] dirEntry is (now) useless In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10621 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 10:42:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 17:42:52 +0000 (UTC) Subject: [Issue 10607] DirEntry has no constructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10607 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 14:35:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 21:35:42 +0000 (UTC) Subject: [Issue 10643] New: Refused const array struct field initialized with void Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10643 Summary: Refused const array struct field initialized with void Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-14 14:35:41 PDT --- class Bar { const int[1000] x = void; this(int n) { x[] = n; } } void main() {} dmd 2.064alpha gives errors but I think the code is correct: test.d(2): Warning: const field with initializer should be static, __gshared, or an enum test.d(4): Error: slice x[] is not mutable There is also some discussion in this thread: http://forum.dlang.org/thread/laxoykycmqqggbfqvobm at forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 15:45:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 22:45:46 +0000 (UTC) Subject: [Issue 10461] Incorrect example of "depend on order of evaluation" expression In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10461 --- Comment #1 from github-bugzilla at puremagic.com 2013-07-14 15:45:45 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/6ab95f9639319702fd8e6fe76b38cc13910d75e1 Fix Issue 10461 Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=10461 https://github.com/D-Programming-Language/dlang.org/commit/2d2fa5dfb61b1af24f30660c773ef8f7d97b89b2 Merge pull request #344 from denis-sh/patch-4 Fix Issue 10461 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 15:46:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 22:46:13 +0000 (UTC) Subject: [Issue 10461] Incorrect example of "depend on order of evaluation" expression In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10461 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #2 from Walter Bright 2013-07-14 15:46:13 PDT --- https://github.com/D-Programming-Language/dlang.org/pull/344 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 15:46:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 14 Jul 2013 22:46:25 +0000 (UTC) Subject: [Issue 10461] Incorrect example of "depend on order of evaluation" expression In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10461 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 14 19:38:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 02:38:16 +0000 (UTC) Subject: [Issue 10643] Refused const array struct field initialized with void In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10643 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim at maxim-fomin.ru --- Comment #1 from Maxim Fomin 2013-07-14 19:38:14 PDT --- >From http://dlang.org/changelog.html#staticfields : "Eventually, they will be deprecated, and then will trigger an error." The issue is that void initializer does not disable initialization but fills aggregate member with zero (it also fills data with zeros for types which .init property is not zero). If you replace void with some number, the code would not still compile, so this is not a specific to void. Also this fails in accordance with change-log. I think this can be change to request to make void behavior to what it does for local variables or request to update the spec, but in current circumstances this issue is resolved-invalid. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 00:13:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 07:13:55 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 jfanatiker at gmx.at changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|9347 | Severity|blocker |major -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 00:19:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 07:19:50 +0000 (UTC) Subject: [Issue 10141] wrong error message with Tuple!(int) : Error: static assert "Cannot put a char[] into a Appender!(string)" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10141 --- Comment #7 from github-bugzilla at puremagic.com 2013-07-15 00:19:47 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8c5cce3e6ffd63ad3af23caf2e15ea7a3eabeea5 fix Issue 10141 - wrong error message with Tuple!(int) : Error: static assert "Cannot put a char[] into a Appender!(string)" Essentially it's bad code if it branches based on the condition `global.errors != 0`. https://github.com/D-Programming-Language/dmd/commit/390a9340cad6f9c44757cd4782792b08d95a56ba Merge pull request #2346 from 9rnsr/fix10141 Issue 10141 - wrong error message with Tuple!(int) : Error: static assert "Cannot put a char[] into a Appender!(string)" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 00:25:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 07:25:40 +0000 (UTC) Subject: [Issue 10644] New: Win64: wrong code when passing arguments through ... Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10644 Summary: Win64: wrong code when passing arguments through ... Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-15 00:25:39 PDT --- An example from the unittest of std.outbuffer: import std.outbuffer; void main() { OutBuffer buf = new OutBuffer(); buf.printf("%d", 42); assert(buf.toString() == "42"); } build and run for win64 throws the assertion. Checking the implementation of OutBuffer.printf shows that there is no uniform abstraction for passing arguments to printf(string format, ...) anyway, and the Win64 version seems broken. This also applies to stream.printf. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 02:14:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 09:14:37 +0000 (UTC) Subject: [Issue 10633] Win64: wrong codegen with %= In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10633 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-15 02:14:32 PDT --- https://github.com/D-Programming-Language/dmd/pull/2347 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 02:15:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 09:15:59 +0000 (UTC) Subject: [Issue 10633] Win64: wrong codegen with %= In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10633 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 03:02:13 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 10:02:13 +0000 (UTC) Subject: [Issue 10645] New: Wrong codegen for shared struct with constructor and pass to atomicLoad Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10645 Summary: Wrong codegen for shared struct with constructor and pass to atomicLoad Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: jfanatiker at gmx.at --- Comment #0 from jfanatiker at gmx.at 2013-07-15 03:02:10 PDT --- The following simple code: --- cat > app2.d << EOF import core.atomic; import std.stdio; struct Test { this(long v) { val = v; } long val; } void main() { shared(Test) test = Test(7); auto buf = atomicLoad(test); writefln("buf: %s, orig: %s", buf, cast(Test)test); } EOF --- produces the following output: buf: Test(0), orig: Test(7) instead of the expected: buf: Test(7), orig: Test(7) Assembly with objdump -d -g -C -S -l app2.o (full output appended): void main() { 0: 55 push %rbp 1: 48 8b ec mov %rsp,%rbp 4: 48 83 ec 10 sub $0x10,%rsp /home/robert/projects/phobosx/source/app2.d:11 shared(Test) test = Test(7); 8: 48 8d 45 f0 lea -0x10(%rbp),%rax <<<<< -0x10 is right c: 48 31 c9 xor %rcx,%rcx f: 48 89 08 mov %rcx,(%rax) 12: 48 be 07 00 00 00 00 movabs $0x7,%rsi 19: 00 00 00 1c: 48 89 c7 mov %rax,%rdi <<<< used here correctly 1f: e8 00 00 00 00 callq 24 <_Dmain+0x24> 24: 48 8d 75 f0 lea -0x10(%rbp),%rsi /home/robert/projects/phobosx/source/app2.d:12 auto buf = atomicLoad(test); 28: 48 8d 7d f8 lea -0x8(%rbp),%rdi <<<< now -0x8, why? 2c: e8 00 00 00 00 callq 31 <_Dmain+0x31> It seems that the wrong address gets passed to atomicLoad. If you remove the constructor of Test the right address (-0x10) is used. Various transformation of this program all have the same wrong output: You can make test global, put it in a union together with a plain long, create a non shared temporary before assigning to the shared variable, use casts, ... The only thing that helps is removing the constructor. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 03:10:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 10:10:08 +0000 (UTC) Subject: [Issue 10645] Wrong codegen for shared struct with constructor and pass to atomicLoad In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10645 --- Comment #1 from jfanatiker at gmx.at 2013-07-15 03:10:02 PDT --- Created an attachment (id=1233) Full assembly dump -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 05:05:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 12:05:05 +0000 (UTC) Subject: [Issue 10570] Example of `how` function for AutoImplement should work for non-abstract class In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10570 --- Comment #1 from github-bugzilla at puremagic.com 2013-07-15 05:05:01 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/bb50a33f1b27d94b7558661df1719d6e72afecda Fixes Issue 10570 https://github.com/D-Programming-Language/phobos/commit/3095e8904a46a849a62ec03ea48f85525c7fe95a Merge pull request #1401 from tom-tan/fix_generateLogger Fix Issue 10570 - Example of `how` function for AutoImplement should work for non-abstract class -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 05:05:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 12:05:31 +0000 (UTC) Subject: [Issue 10474] When takeExactly returns a new range type, it fails to propagate all relevant attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10474 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-15 05:05:29 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/32c3998ebda05bfed210f31d8ee70c845f014852 Fix for issue# 10474. https://github.com/D-Programming-Language/phobos/commit/9b78a6f5e70935f6f709cea67379f8e34f6c3957 Merge pull request #1377 from jmdavis/10474 Fix for issue# 10474 - takeExactly fails to propagate all relevant attributes -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 05:06:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 12:06:04 +0000 (UTC) Subject: [Issue 10570] Example of `how` function for AutoImplement should work for non-abstract class In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10570 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 05:06:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 12:06:25 +0000 (UTC) Subject: [Issue 10474] When takeExactly returns a new range type, it fails to propagate all relevant attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10474 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Version|unspecified |D2 Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 06:31:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 13:31:46 +0000 (UTC) Subject: [Issue 10646] New: [ICE] when casting dynamic array/static array to class reference Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10646 Summary: [ICE] when casting dynamic array/static array to class reference Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: henning at still-hidden.de --- Comment #0 from Henning Pohl 2013-07-15 06:31:45 PDT --- void main() { class C { } C[] csd; C[2] css; auto c1 = cast(C)csd; auto c2 = cast(C)css; } --- test.d(6): Error: e2ir: cannot cast csd of type C[] to type test.main.C test.d(7): Error: e2ir: cannot cast css of type C[2LU] to type test.main.C --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 06:36:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 13:36:32 +0000 (UTC) Subject: [Issue 10646] [ICE] when casting dynamic array/static array to class reference In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10646 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull --- Comment #1 from Henning Pohl 2013-07-15 06:36:32 PDT --- https://github.com/D-Programming-Language/dmd/pull/2348 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 07:05:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 14:05:37 +0000 (UTC) Subject: [Issue 10647] New: AutoImplement should implement overridden member functions with 'override' attributes Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10647 Summary: AutoImplement should implement overridden member functions with 'override' attributes Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: ttanjo at gmail.com --- Comment #0 from Tomoya Tanjo 2013-07-15 07:05:36 PDT --- The following code should be compiled with no error messages but it does not. --- // It is like BlackHole but it also overrides non-virtual functions string generateDoNothing(C, alias fun)() @property { import std.traits; string stmt; static if (is(ReturnType!fun == void)) stmt ~= ""; else { string returnType = ReturnType!fun.stringof; stmt ~= "return "~returnType~".init;"; } return stmt; } // A class to be overridden class Foo{ void bar(int a) { } } // Do nothing template template DoNothing(Base) { import std.typecons; alias DoNothing = AutoImplement!(Base, generateDoNothing, isAlwaysTrue); } template isAlwaysTrue(alias fun) { enum isAlwaysTrue = true; } void main() { auto foo = new DoNothing!Foo(); foo.bar(13); } --- In dmd v2.064-devel-390a934 on Linux 64bit, it is compiled with the message "Deprecation: overriding base class function without using override attribute is deprecated". The reason is that current AutoImplement implements overridden member functions with 'override' attritubes only for the abstract functions. It is the reason why WhiteHole and BlackHole work without depcerated messages. They only override abstract functions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 10:13:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 17:13:35 +0000 (UTC) Subject: [Issue 10648] New: std.traits.isMutable is true for struct defined immutable Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10648 Summary: std.traits.isMutable is true for struct defined immutable Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-15 10:13:33 PDT --- With dmd 2.064alpha this code runs with no assert errors: import std.traits: isMutable; immutable struct Foo {} void main () { static assert(isMutable!Foo); } Issue found by JS: http://forum.dlang.org/thread/xjpfwfydzxxwqisvqudw at forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 12:07:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 19:07:18 +0000 (UTC) Subject: [Issue 10649] New: immutable/const aggregate definitions not consistent Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10649 Summary: immutable/const aggregate definitions not consistent Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: public at dicebot.lv --- Comment #0 from Dicebot 2013-07-15 12:07:17 PDT --- immutable struct A { struct B { int x; } int x; static int y; } void main() { A.y = 42; // works A a; // a.x = 42; // fails A.B b; b.x = 42; // works } ------------------------------------- Applying const/immutable qualifier to aggregate definition propagates it only to fields and methods of struct/class. static fields and nested definitions are left mutable which is extremely confusing and inconsistent with usual transitivity. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 13:13:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 20:13:50 +0000 (UTC) Subject: [Issue 10357] std.typecons.Nullable!(SysTime).Nullable.__ctor!() error instantiating In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10357 Jesse Phillips changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Jesse.K.Phillips+D at gmail.co | |m --- Comment #1 from Jesse Phillips 2013-07-15 13:13:48 PDT --- (In reply to comment #0) > With D 2.063, the following code does no longer compile: > > import std.datetime; > import std.typecons; > > unittest > { > Nullable!SysTime time = SysTime(0); > } A work around is: unittest { Nullable!SysTime time; time = SysTime(0); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 13:40:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 20:40:36 +0000 (UTC) Subject: [Issue 10593] array's reserve/capacity go haywire if length has been changed prior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10593 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|x86 |All OS/Version|Windows |All Severity|critical |blocker --- Comment #2 from monarchdodra at gmail.com 2013-07-15 13:40:35 PDT --- I'm marking this as blocker. The fact that a reserve could fail, while still doing something, is highly problematic. I also believe this is the issue creating the failures here: https://github.com/D-Programming-Language/phobos/pull/1413 Will provide more information as I can. Also: Confirmed on all platforms. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 15:16:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 22:16:12 +0000 (UTC) Subject: [Issue 9607] std.random.randomShuffle and partialShuffle don't work with Xorshift In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9607 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-15 15:16:10 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e86bc65639036d240d5ec6ce0254ccebee097943 Fix Issue 9607 - std.random.randomShuffle() and partialShuffle() don't work with Xorshift. This is an instance of Issue 2803, a clash between a template parameter and a default argument. I've used the workaround proposed in that issue thread: http://d.puremagic.com/issues/show_bug.cgi?id=2803#c1 Tests have been included to ensure that these functions work with all possible RNG types. https://github.com/D-Programming-Language/phobos/commit/443b54e30b4b67b8968ecde51dcae66c855c135b Merge pull request #1362 from WebDrake/randomshuffle Fix Issue 9607 - std.random.randomShuffle() and partialShuffle() don't work with Xorshift. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 15:45:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 22:45:26 +0000 (UTC) Subject: [Issue 10394] opBinaryRight!"in" and tuple In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10394 --- Comment #3 from Justin Whear 2013-07-15 15:45:23 PDT --- An update on this issue: we have worked around this by switching away from "in" to a method-based approach, so this is no longer blocking for the reporter. I think this issue remains valid until it's decided whether the "in" operator (or operators in general) will allow a tuple on the left hand side. Here's a simplified example that matches with our use case: ----------------------------- struct Graph(T, Address...) { struct Node { Address address; T payload; } ... Node* opBinaryRight(string op)(Address address) if (op == "in) { ... } } void main() { Graph!(double, int, string) graph; auto node = ...procure a node from somwhere... // node.address is preferred to tuple(node.address) if (auto inGraph = node.address in graph) { ... } } ----------------------------- As I said, we have worked around this because it's not unreasonable for binary operators to only allow one value on each side, but it was also nice to have this kind of syntax in 2.062 and previous. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 16:16:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 23:16:23 +0000 (UTC) Subject: [Issue 10434] Don't use Random as template parameter name in std.random (or anywhere else) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10434 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-15 16:16:22 PDT --- +1 for RandGen, self-documenting and doesn't clash with existing symbol. Rng is a bit obscure for those not in the know. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 16:19:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 23:19:09 +0000 (UTC) Subject: [Issue 9607] std.random.randomShuffle and partialShuffle don't work with Xorshift In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9607 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 16:55:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 15 Jul 2013 23:55:25 +0000 (UTC) Subject: [Issue 10642] Win64: wrong codegen comparing different sized integer arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #2 from Walter Bright 2013-07-15 16:55:23 PDT --- > compile with "dmd -O -m64 test.d" produces Need to add -unittest -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 17:00:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 00:00:55 +0000 (UTC) Subject: [Issue 10650] New: std.bitmanip.FixedBitArray Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10650 Summary: std.bitmanip.FixedBitArray Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-15 17:00:54 PDT --- This is a struct with no defined constructor that uses a bit array of statically known size: import std.bitmanip: BitArray; struct Foo { enum nBits = 1_024; size_t[nBits / size_t.sizeof] buffer; BitArray bitSet; bool isInitialized = false; void bar() /*pure nothrow*/ { if (!isInitialized) { bitSet.init(buffer, nBits); isInitialized = true; } // ....... } } void main() {} A statically known size is useful to reduce pressure a bit on the GC, to increase cache locality, etc. So I suggest to introduce in std.bitmanip a simple FixedBitArray based on BitArray that offers a simpler usage for statically known sizes of bit arrays: struct FixedBitArray(size_t nBits) { private size_t[nBits / size_t.sizeof + (nBits % size_t.sizeof) ? 1 : 0] buffer; ... } import std.bitmanip: FixedBitArray; struct Foo { FixedBitArray!(1_024) bitSet; void bar() pure nothrow { // ....... } } void main() {} An alternative name is "BoundedBitArray" as in the Ada 2012 bounded collections. An alternative is to modify BitArray to allow both usages nicely. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 17:48:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 00:48:52 +0000 (UTC) Subject: [Issue 10642] Win64: wrong codegen comparing different sized integer arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Windows |All Severity|normal |major --- Comment #3 from Walter Bright 2013-07-15 17:48:51 PDT --- https://github.com/D-Programming-Language/dmd/pull/2349 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 17:59:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 00:59:56 +0000 (UTC) Subject: [Issue 10605] Lambda grammar is not sufficient In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10605 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-15 17:59:55 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/f7e72cc9885eaab905810ef5afc448c5bf197292 fix Issue 10605 - Lambda grammar is not sufficient Improve Lambda grammar and describe rewrite rule https://github.com/D-Programming-Language/dlang.org/commit/c73a1f5cdd283a9bc741d8883defee9901c1234d Merge pull request #351 from 9rnsr/fix_lambda Issue 10605 - Lambda grammar is not sufficient -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 18:07:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 01:07:36 +0000 (UTC) Subject: [Issue 10648] std.traits.isMutable is true for struct defined immutable In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10648 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Kenji Hara 2013-07-15 18:07:35 PDT --- (In reply to comment #0) > With dmd 2.064alpha this code runs with no assert errors: > > > import std.traits: isMutable; > immutable struct Foo {} > void main () { > static assert(isMutable!Foo); > } > > > > Issue found by JS: > http://forum.dlang.org/thread/xjpfwfydzxxwqisvqudw at forum.dlang.org It is not an issue. Because: 1. Qualified struct declaration and its behavior is properly documented. http://dlang.org/struct#ConstStruct 2. The struct name `Foo` always represent 'mutable type Foo'. And, isMutable tests whether the type qualifier is mutable or not. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 18:10:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 01:10:40 +0000 (UTC) Subject: [Issue 10605] Lambda grammar is not sufficient In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10605 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 18:54:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 01:54:54 +0000 (UTC) Subject: [Issue 10646] No front-end error for invalid casting dynamic array/static array to class reference In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10646 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice | Summary|[ICE] when casting dynamic |No front-end error for |array/static array to class |invalid casting dynamic |reference |array/static array to class | |reference --- Comment #2 from Kenji Hara 2013-07-15 18:54:52 PDT --- (In reply to comment #0) > void main() { > class C { } > > C[] csd; > C[2] css; > auto c1 = cast(C)csd; > auto c2 = cast(C)css; > } > > --- > test.d(6): Error: e2ir: cannot cast csd of type C[] to type test.main.C > test.d(7): Error: e2ir: cannot cast css of type C[2LU] to type test.main.C > --- I think there's no "Internal Compiler Error". These are proper errors but just come from glue layer. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 19:08:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 02:08:19 +0000 (UTC) Subject: [Issue 10651] New: Throwing non-Throwable object causes ICE Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10651 Summary: Throwing non-Throwable object causes ICE Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-15 19:08:19 PDT --- Code: void main() { alias T = int; throw new T(); // ICE } Output: test.d(4): Error: can only throw class objects derived from Throwable, not type int* assert statement.c(4894) cd -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 19:14:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 02:14:51 +0000 (UTC) Subject: [Issue 10651] Throwing non-Throwable object causes ICE In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10651 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-15 19:14:50 PDT --- https://github.com/D-Programming-Language/dmd/pull/2350 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 19:49:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 02:49:29 +0000 (UTC) Subject: [Issue 10647] AutoImplement should implement overridden member functions with 'override' attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10647 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #1 from Kenji Hara 2013-07-15 19:49:26 PDT --- https://github.com/D-Programming-Language/phobos/pull/1416 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 20:42:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 03:42:57 +0000 (UTC) Subject: [Issue 10651] Throwing non-Throwable object causes ICE In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10651 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-15 20:42:56 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4a3faa1be01d9518aa5286f686f8927689bc4d7d fix Issue 10651 - Throwing non-Throwable object causes ICE https://github.com/D-Programming-Language/dmd/commit/0627f87bbd34db8493d21c8d88c32fef49065980 Merge pull request #2350 from 9rnsr/fix10651 Issue 10651 - Throwing non-Throwable object causes ICE -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 20:45:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 03:45:50 +0000 (UTC) Subject: [Issue 10651] Throwing non-Throwable object causes ICE In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10651 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 22:05:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 05:05:20 +0000 (UTC) Subject: [Issue 9784] Fail to use auto when implementing class interface methods In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9784 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #2 from Kenji Hara 2013-07-15 22:05:18 PDT --- *** This issue has been marked as a duplicate of issue 8318 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 15 22:05:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 05:05:21 +0000 (UTC) Subject: [Issue 8318] Cannot override a method with inferred return type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8318 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yazan.dabain at gmail.com --- Comment #3 from Kenji Hara 2013-07-15 22:05:18 PDT --- *** Issue 9784 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: ------- From d-bugmail at puremagic.com Tue Jul 16 02:32:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 09:32:35 +0000 (UTC) Subject: [Issue 7863] randomShuffle doesn't work with a Xorshift In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7863 Joseph Rushton Wakeling changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #2 from Joseph Rushton Wakeling 2013-07-16 02:32:30 PDT --- Fixed by pull request: https://github.com/D-Programming-Language/phobos/commit/443b54e30b4b67b8968ecde51dcae66c855c135b See also: http://d.puremagic.com/issues/show_bug.cgi?id=9607 *** This issue has been marked as a duplicate of issue 9607 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 02:32:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 09:32:35 +0000 (UTC) Subject: [Issue 9607] std.random.randomShuffle and partialShuffle don't work with Xorshift In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9607 --- Comment #4 from Joseph Rushton Wakeling 2013-07-16 02:32:31 PDT --- *** Issue 7863 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: ------- From d-bugmail at puremagic.com Tue Jul 16 03:36:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 10:36:48 +0000 (UTC) Subject: [Issue 10652] New: Mixins doesn't evaluate on cross imports Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10652 Summary: Mixins doesn't evaluate on cross imports Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: temtaime at gmail.com --- Comment #0 from Temtaime 2013-07-16 03:36:46 PDT --- A.d: import B; T var; B.d: import A; mixin(`alias T = int;`); Expected result: T is int variable, code compiles OK Compiler gives on compiling B.d: Error: undefined identifier T If i change mixin(`alias T = int;`); to simple code alias T = int; Then it's compiles. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 07:29:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 14:29:58 +0000 (UTC) Subject: [Issue 3702] Replace __traits and is(typeof()) with a 'magic namespace' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=3702 Nick Treleaven changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ntrel-public at yahoo.co.uk --- Comment #4 from Nick Treleaven 2013-07-16 07:29:48 PDT --- (In reply to comment #0) > is(typeof(XXX)) is infamously ugly and unintuitive > __traits(compiles, XXX) is more comprehensible, but just as ugly. > > They are giving metaprogramming in D a bad name. I think we need to get rid of > both of them. ... > meta.compiles(XXX) > meta.isArithmetic; // note, property syntax OK if no arguments > meta.isArithmetic(int*); I support this, but I think using template instantiation syntax might be even better, to help avoid brackets for simple cases: meta.isArithmetic!int meta.isArithmetic!(i, i+1) meta.isArithmetic // could be OK, otherwise append !() meta.parent!T meta.typeid!x For simple code snippets, brackets as proposed don't seem too bad. But we know how much nesting often happens in complex code, and eliminating brackets in a complex expression is a clear win for readability. __traits(compiles, ...) must be the most commonly used trait, and I think it's very often used with nullary delegate literals. So I also propose this special case: meta.compiles!{...} Here, the () brackets after '!' are not required because the braces are enough. compare with: meta.compiles({...}) __traits(compiles, {...}) is(typeof({...})) It would be really nice to have 'meta' as a keyword, it could also be used for manifest constants, instead of enum: meta five = 5; But people may already be using the identifier 'meta', e.g. in a module name, xtd.meta. Perhaps we should make meta a 'soft' reserved word. I.e. it is allowed as an identifier, but the compiler prints a message 'Note: meta may become a reserved word in later versions'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 10:30:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 17:30:43 +0000 (UTC) Subject: [Issue 10141] wrong error message with Tuple!(int) : Error: static assert "Cannot put a char[] into a Appender!(string)" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10141 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 10:47:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 17:47:58 +0000 (UTC) Subject: [Issue 10633] Win64: wrong codegen with %= In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10633 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-16 10:47:57 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2f74f0243c3c730c67c6c610d5922008f1121684 fix Issue 10633 - Win64: wrong codegen with %= https://github.com/D-Programming-Language/dmd/commit/70cc17d2132d7dbf7d569ddf0fcbbea58a6c7d76 Merge pull request #2347 from WalterBright/fix10633 fix Issue 10633 - Win64: wrong codegen with %= -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 11:14:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 18:14:52 +0000 (UTC) Subject: [Issue 10642] Win64: wrong codegen comparing different sized integer arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 --- Comment #4 from Walter Bright 2013-07-16 11:14:50 PDT --- https://github.com/D-Programming-Language/dmd/pull/2352 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 11:17:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 18:17:29 +0000 (UTC) Subject: [Issue 10633] Win64: wrong codegen with %= In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10633 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-16 11:17:29 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/500e1d110dff1c69ee14b671b199f4c44915de86 Merge pull request #2347 from WalterBright/fix10633 fix Issue 10633 - Win64: wrong codegen with %= -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 11:36:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 18:36:19 +0000 (UTC) Subject: [Issue 10646] No front-end error for invalid casting dynamic array/static array to class reference In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10646 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-16 11:36:18 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/450f6cb9c3bfc7697c529a7750e8e2818e8a8a3e fix issue 10646 - [ICE] when casting dynamic array/static array to class reference https://github.com/D-Programming-Language/dmd/commit/20d0bc0226f059d8a6ecf87e48d44c5c50428315 Merge pull request #2348 from hpohl/10646 fix issue 10646 - [ICE] when casting dynamic array/static array to class reference -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 12:55:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 19:55:43 +0000 (UTC) Subject: [Issue 10646] No front-end error for invalid casting dynamic array/static array to class reference In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10646 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 13:06:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 20:06:42 +0000 (UTC) Subject: [Issue 10642] Win64: wrong codegen comparing different sized integer arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-16 13:06:42 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/439e85a7ed96dc9eb03a36c967cf854b8e176cf3 fix Issue 10642 - Win64: wrong codegen comparing different sized integer arguments https://github.com/D-Programming-Language/dmd/commit/43d47a1dbc378bbeebf7299b2075717f3e6db399 Merge pull request #2352 from WalterBright/fix10642-2 fix Issue 10642 - Win64: wrong codegen comparing different sized integer... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 13:12:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 20:12:14 +0000 (UTC) Subject: [Issue 10642] Win64: wrong codegen comparing different sized integer arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-16 13:12:13 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/eab5bf88f306068adff69acf50f7536555f42151 Merge pull request #2352 from WalterBright/fix10642-2 fix Issue 10642 - Win64: wrong codegen comparing different sized integer... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 13:13:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 20:13:05 +0000 (UTC) Subject: [Issue 10642] Win64: wrong codegen comparing different sized integer arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10642 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Version|D2 |D1 & D2 Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 13:13:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 20:13:42 +0000 (UTC) Subject: [Issue 10633] Win64: wrong codegen with %= In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10633 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Version|D2 |D1 & D2 Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 13:23:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 20:23:20 +0000 (UTC) Subject: [Issue 10653] New: non-shared pure constructors can conflict with shared constructors Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10653 Summary: non-shared pure constructors can conflict with shared constructors Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: jmdavisProg at gmx.com --- Comment #0 from Jonathan M Davis 2013-07-16 13:23:19 PDT --- This code compiles and runs just fine import core.sync.mutex; import std.stdio; class FixedList(T){ // list private T[] list; // number of items private size_t numberOfItems; // capacity private size_t capacity; // mutex private Mutex listMutex; // get capacity @property public size_t Capacity(){ return capacity; } @property public shared size_t Capacity(){ return capacity; } // constructor public this( size_t capacity ){ // initialise numberOfItems = 0; this.capacity = capacity; writeln("Cons Normal"); } // constructor public shared this( size_t capacity ){ // initialise numberOfItems = 0; this.capacity = capacity; // create mutex listMutex = cast(shared)(new Mutex()); writeln("Cons Shared"); } } void main() { auto list1 = new shared FixedList!int( 128 ); auto list2 = new FixedList!int( 128 ); } as it should. But if you comment out the calls to writeln (making the constructors pure), then you get this compilation error q.d(45): Error: called with argument types: (int) shared matches both: q.d(22): q.FixedList!int.FixedList.this(ulong capacity) and: q.d(31): q.FixedList!int.FixedList.this(ulong capacity) q.d(45): Error: no constructor for FixedList because the compiler can now use either constructor to construct a shared object thanks to the fact that it knows that the constructors will return unique objects. So, this the usability improvement of making pure constructors able to construct shared or immutable objects is biting us here. I would suggest that in cases where one of the constructors can construct a shared (or immutable) object thanks to its purity and a constructor which is explictly shared (or immutable) exists, the one which is explicitly shared (or immutable) should take precedence. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 13:30:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 20:30:16 +0000 (UTC) Subject: [Issue 10653] non-shared pure constructors can conflict with shared constructors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10653 --- Comment #1 from Jonathan M Davis 2013-07-16 13:30:15 PDT --- This came up in this stackoverflow question: http://stackoverflow.com/questions/17673721/no-constructor-found-in-the-absence-of-writeln -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 16:12:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 16 Jul 2013 23:12:57 +0000 (UTC) Subject: [Issue 10654] New: std.string.outdent() wrongly manages Windows newlines, and it isn't pure nothrow Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10654 Summary: std.string.outdent() wrongly manages Windows newlines, and it isn't pure nothrow Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-16 16:12:56 PDT --- If I save this program on Windows (with the typical newlines used on Windows): import std.stdio: writeln; import std.string: outdent; string foo() /*pure nothrow*/ { return q{ first line second line third line }.outdent; } void main() { writeln(foo()); } It outputs double newlines: first line second line third line Also std.string.outdent() is not pure nor nothrow. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 17:32:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 00:32:07 +0000 (UTC) Subject: [Issue 10655] New: Error: recursive alias declaration Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10655 Summary: Error: recursive alias declaration Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-16 17:32:06 PDT --- ---- //OK: alias T=typeof(x); T x0; @property auto x(){ return 1.1; } //NG: struct A{ alias T=typeof(x); //Error: alias main.A.T recursive alias declaration T x0; @property auto x(){ return 1.1; } } ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 17:45:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 00:45:52 +0000 (UTC) Subject: [Issue 10656] New: support array operations for complex arrays Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10656 Summary: support array operations for complex arrays Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-16 17:45:52 PDT --- import std.complex; void main(){ version(a1) auto a=[complex(0,0)];//Error: incompatible types for ((a[]) / (2)): 'Complex!(double)[]' and 'int' else version(a2) auto a = [0 + 0.0i];//Error: incompatible types for ((a[]) / (2)): 'cdouble[]' and 'int' else version(a3) auto a = [0.0]; else static assert(0); //auto b=a[]+2.0; // Error: Array operation a[] + 2.00000 not implemented (a3) or incompatible types for ... (a1/a2) a[]*=2; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:00:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:00:24 +0000 (UTC) Subject: [Issue 10078] std.string.indexOf(Char[], dchar, CaseSensitive) fails at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10078 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-16 18:00:21 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4bafa5735ff54dca7ae386599ab1c2be87b72cb8 fix Issue 10078 - std.string.indexOf fails at compile time https://github.com/D-Programming-Language/phobos/commit/8410f983b485c3cd7c08ca82221405b2937c8e70 Merge pull request #1417 from dawgfoto/fix10078 fix Issue 10078 - std.string.indexOf fails at compile time -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:04:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:04:20 +0000 (UTC) Subject: [Issue 10624] [REG2.064a] ICE with tuple comparison In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10624 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-16 18:04:19 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0145856f4cca1b1a3115325b0e5718f07fb0eb62 [REG2.064a] fix Issue 10624 - ICE with tuple comparison -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:04:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:04:23 +0000 (UTC) Subject: [Issue 10600] regression(2.063.2) ICE: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10600 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-16 18:04:22 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fd21fa566e85276d9fe5926c7a1b2d0fcaee9cd9 [REG2.063] fix Issue 10600 - ICE: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. https://github.com/D-Programming-Language/dmd/commit/c08e3a92e371858bed207c40b8bb42aaedf54827 Merge pull request #2338 from 9rnsr/fix10600 [REG2.063] Issue 10600 - ICE: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:04:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:04:30 +0000 (UTC) Subject: [Issue 10600] regression(2.063.2) ICE: Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this), function semantic, file struct.c, line 741. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10600 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:06:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:06:34 +0000 (UTC) Subject: [Issue 10618] Template instance member access disallowed in dynamic array allocation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10618 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-16 18:06:33 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/356a6c999c78173513017da0b29278bd6a8eedd3 fix Issue 10618 - Template instance member access disallowed in dynamic array allocation -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:06:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:06:37 +0000 (UTC) Subject: [Issue 10609] Refused UFCS in __traits(compile) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10609 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-16 18:06:36 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b37e2c49ff026bd880eb49ed4e2dd70ee8ba1d0e fix Issue 10609 - Refused UFCS in __traits(compile) https://github.com/D-Programming-Language/dmd/commit/b1467fabffad1889b28bafb76e32a6acae4b78e4 Merge pull request #2337 from 9rnsr/fix10609 Issue 10609 - Refused UFCS in __traits(compile) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:06:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:06:52 +0000 (UTC) Subject: [Issue 10609] Refused UFCS in __traits(compile) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10609 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:07:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:07:46 +0000 (UTC) Subject: [Issue 10078] std.string.indexOf(Char[], dchar, CaseSensitive) fails at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10078 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:13:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:13:57 +0000 (UTC) Subject: [Issue 10618] Template instance member access disallowed in dynamic array allocation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10618 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:14:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:14:03 +0000 (UTC) Subject: [Issue 10624] [REG2.064a] ICE with tuple comparison In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10624 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:27:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:27:47 +0000 (UTC) Subject: [Issue 10647] AutoImplement should implement overridden member functions with 'override' attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10647 --- Comment #2 from Kenji Hara 2013-07-16 18:27:46 PDT --- (In reply to comment #1) > https://github.com/D-Programming-Language/phobos/pull/1416 More better Phobos change: https://github.com/D-Programming-Language/phobos/pull/1414 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:35:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:35:47 +0000 (UTC) Subject: [Issue 1900] Template overload sets & traits templates In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1900 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-16 18:35:45 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e59a33f2b639dc9a6eb431ebcf694f533916f038 fix Issue 1900 - Template overload sets & traits templates https://github.com/D-Programming-Language/dmd/commit/cc6b7372f2efffd4c5c0314373af3b595ba06a2c Merge pull request #1660 from 9rnsr/fix1900 Issue 1900 & 8352 & 9235 - Implement Template Overload Set -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:35:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:35:50 +0000 (UTC) Subject: [Issue 7780] Template mixin'd members do not properly overload In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7780 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-16 18:35:49 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f729d78d895a78a426de229c22cf3bc2174c142b fix Issue 7780 - Template mixin'd members do not properly overload -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:35:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:35:53 +0000 (UTC) Subject: [Issue 8352] Wrong "__overloadset isn't a template" error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8352 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-16 18:35:52 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/909e992ebbae2b3430608caeaf524323eee3d74a fix Issue 8352 - Wrong "__overloadset isn't a template" error https://github.com/D-Programming-Language/dmd/commit/cc6b7372f2efffd4c5c0314373af3b595ba06a2c Merge pull request #1660 from 9rnsr/fix1900 Issue 1900 & 8352 & 9235 - Implement Template Overload Set -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:35:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:35:57 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 --- Comment #18 from github-bugzilla at puremagic.com 2013-07-16 18:35:55 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/864bb113028ec56044c32643c9758b0f5ef8bf2c fix Issue 8441 - mixin containing template functions causes compiler errors -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:36:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:36:03 +0000 (UTC) Subject: [Issue 9235] Template mixin doesn't allow to mixin non-conflicting overloads In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9235 --- Comment #7 from github-bugzilla at puremagic.com 2013-07-16 18:36:00 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cfe5b6c97c7a4db75f173768db407c6cb8007e30 fix Issue 9235 - Template mixin doesn't allow to mixin non-conflicting overloads https://github.com/D-Programming-Language/dmd/commit/cc6b7372f2efffd4c5c0314373af3b595ba06a2c Merge pull request #1660 from 9rnsr/fix1900 Issue 1900 & 8352 & 9235 - Implement Template Overload Set -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 18:48:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 01:48:26 +0000 (UTC) Subject: [Issue 9319] Unexpected compiles __traits behaviour in a certain situation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9319 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Kenji Hara 2013-07-16 18:48:24 PDT --- Fixed in 2.063. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 22:11:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 05:11:59 +0000 (UTC) Subject: [Issue 10634] Win64: wrong codegen with .int of small structs In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10634 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-16 22:11:58 PDT --- https://github.com/D-Programming-Language/dmd/pull/2354 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 22:33:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 05:33:37 +0000 (UTC) Subject: [Issue 10657] New: wrong error message with unexisting symbol Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10657 Summary: wrong error message with unexisting symbol Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-16 22:33:36 PDT --- version(v1) void fun(T)(T a)if(is(T==unexisting!T)){} //OK: Error: template instance unexisting!(T) template 'unexisting' is not defined version(v2) void fun(T)(T a)if(is(unexisting!T==unexisting!T)){} //NG: Error: template bug_2013_07_16_22_23_32.fun does not match any function template declaration. Candidates are: unittest{ fun(0); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 23:56:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 06:56:12 +0000 (UTC) Subject: [Issue 10658] New: Cannot merge template overload set by using alias declaration Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10658 Summary: Cannot merge template overload set by using alias declaration Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: pull, rejects-valid Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-16 23:56:09 PDT --- It works with function overload set, but doesn't work with template overload set. Test case: ------------------------- module a; auto foo(int) { return 1; } template Bar(int n) { enum Bar = 1; } ------------------------- module b; auto foo(long) { return 2; } template Bar(long n) { enum Bar = 2; } ------------------------- module test; import a, b; alias foo = a.foo; alias foo = b.foo; // OK static assert(foo(1) == 1); // OK static assert(foo(1L) == 2); // OK alias Bar = a.Bar; // test.d(9) alias Bar = b.Bar; // doesn't work [X] //static assert(Bar!1 == 1); //static assert(Bar!1L == 2); ------------------------- [X]: test.d(10): Error: alias test.Bar conflicts with alias test.Bar at test.d(9) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 23:58:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 06:58:12 +0000 (UTC) Subject: [Issue 7780] Template mixin'd members do not properly overload In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7780 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 16 23:59:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 06:59:14 +0000 (UTC) Subject: [Issue 8352] Wrong "__overloadset isn't a template" error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8352 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 00:05:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 07:05:03 +0000 (UTC) Subject: [Issue 9235] Template mixin doesn't allow to mixin non-conflicting overloads In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9235 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|NEW |RESOLVED Resolution| |FIXED --- Comment #8 from Kenji Hara 2013-07-17 00:05:02 PDT --- Template overload set has been implemented in git head. But, the case in comment#2 does not yet work. For the remain issue I opened bug 10658. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 00:07:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 07:07:09 +0000 (UTC) Subject: [Issue 8441] mixin containing template functions causes compiler errors In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8441 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #19 from Kenji Hara 2013-07-17 00:07:08 PDT --- Template overload set has been implemented in git head. For the remain related issue I opened bug 10658. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 00:10:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 07:10:40 +0000 (UTC) Subject: [Issue 1900] Template overload sets & traits templates In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1900 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|NEW |RESOLVED Depends on| |10658 Resolution| |FIXED --- Comment #6 from Kenji Hara 2013-07-17 00:10:39 PDT --- Template overload set has been implemented in git head. But, merging overload set by using alias declaration is not yet implemented. See bug 10658. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 00:13:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 07:13:39 +0000 (UTC) Subject: [Issue 1900] Template overload sets & traits templates In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1900 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 00:32:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 07:32:14 +0000 (UTC) Subject: [Issue 10634] Win64: wrong codegen with .int of small structs In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10634 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-17 00:32:14 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1b089fc3c80f5be470028d5eedc205f7597018ec fix Issue 10634 - Win64: wrong codegen with .int of small structs https://github.com/D-Programming-Language/dmd/commit/97b843779aa6d361b625052a9f1ffecd54a97129 Merge pull request #2354 from WalterBright/fix10634 fix Issue 10634 - Win64: wrong codegen with .int of small structs -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 01:17:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 08:17:12 +0000 (UTC) Subject: [Issue 10634] Win64: wrong codegen with .int of small structs In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10634 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-17 01:17:10 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2c851a4ebffcc3903c403d893e54d6a43e4cd417 Merge pull request #2354 from WalterBright/fix10634 fix Issue 10634 - Win64: wrong codegen with .int of small structs -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 01:17:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 08:17:35 +0000 (UTC) Subject: [Issue 10634] Win64: wrong codegen with .int of small structs In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10634 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 01:37:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 08:37:08 +0000 (UTC) Subject: [Issue 10659] New: Program segfaults using std.algorithm.map and std.algorithm.filter Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10659 Summary: Program segfaults using std.algorithm.map and std.algorithm.filter Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: peterneubauer2 at gmail.com --- Comment #0 from Peter Neubauer 2013-07-17 01:37:07 PDT --- The following source produces a program which segfaults: === File a.d: === import std.algorithm; void main () { auto p = (int) => true; [ 1 ].map!(x => x).filter!p; } === File b.d: === import std.algorithm; Output: $ dmd b.d a.d && ./b Segmentation fault (core dumped) The error depends on compile order: $ dmd a.d b.d && ./a $ # runs & exits fine -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 01:37:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 08:37:57 +0000 (UTC) Subject: [Issue 10659] Program segfaults using std.algorithm.map and std.algorithm.filter In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10659 --- Comment #1 from Peter Neubauer 2013-07-17 01:37:56 PDT --- DMD version is 2.063.2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 01:46:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 08:46:46 +0000 (UTC) Subject: [Issue 10660] New: ddoc on std.algorithm: Cheat sheet description for 'filter' is wrong Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10660 Summary: ddoc on std.algorithm: Cheat sheet description for 'filter' is wrong Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: peterneubauer2 at gmail.com --- Comment #0 from Peter Neubauer 2013-07-17 01:46:45 PDT --- http://dlang.org/phobos/std_algorithm.html describes filter like this: filter!"a > 0"([1, -1, 2, 0, -3]) iterates over elements 1, 2, and 0. Actually, 0 is not greater than 0 and the result will be just 1, 2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 04:30:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 11:30:52 +0000 (UTC) Subject: [Issue 10661] New: Add secureZeroMemory function in Phobos Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10661 Summary: Add secureZeroMemory function in Phobos Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-17 04:30:49 PDT --- I propose to add to Phobos a function similar to SecureZeroMemory that the D compiler handles in a special way: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366877%28v=vs.85%29.aspx This function acts like a memset, to zero an interval of memory. What's special of it is that the compiler never optimizes it away. So it's usable in cryptographic functions that must assure undesired information never exits the function. As example usage in std.digest.md, a strongly optimizing D compiler like LDC2 used with link-time optimization can optimize away this zeroing: struct MD5 { ... private nothrow pure void transform(const(ubyte[64])* block) { ... //Zeroize sensitive information. x[] = 0; } That can be replaced by a call to secureZeroMemory() to ensure the desired safety. Having a standard function in Phobos, supported by the compiler makes this small feature portable across all D compilers, unlike C++ where SecureZeroMemory is just a Windows function. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 04:51:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 11:51:21 +0000 (UTC) Subject: [Issue 8086] std.stdio is underdocumented In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8086 Nick Treleaven changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ntrel-public at yahoo.co.uk --- Comment #1 from Nick Treleaven 2013-07-17 04:51:19 PDT --- (In reply to comment #0) > 1. byLine is documented to return a LinesReader, but that is the only > mention of LinesReader anywhere Now fixed in git master. ... > 3. LinesReader should say that it has an element type of dchar, decoding UTF8 > as required Assuming you meant ByLine, byLine now documents that the element type is Char[]. UTF8 decoding is not mentioned though. ... > 6. byDchar is undocumented Doesn't seem to exist now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 04:59:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 11:59:52 +0000 (UTC) Subject: [Issue 10662] New: byLine!(Char, immutable Char) won't compile in git master Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10662 Summary: byLine!(Char, immutable Char) won't compile in git master Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: ntrel-public at yahoo.co.uk --- Comment #0 from Nick Treleaven 2013-07-17 04:59:51 PDT --- This won't compile because readln(buf) now requires a mutable buf. I have a fix ready to submit presently. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 05:16:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 12:16:56 +0000 (UTC) Subject: [Issue 10662] byLine!(Char, immutable Char) won't compile in git master In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10662 Nick Treleaven changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #1 from Nick Treleaven 2013-07-17 05:16:54 PDT --- https://github.com/D-Programming-Language/phobos/pull/1418 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 05:51:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 12:51:15 +0000 (UTC) Subject: [Issue 10662] byLine!(Char, immutable Char) won't compile in git master In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10662 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #2 from monarchdodra at gmail.com 2013-07-17 05:51:14 PDT --- I question whether or not this is a "rejects valid": byLine explicitly states buffer re-use, so requesting a `ByLine!(immutable Char)` simply is not possible. That said, I *would* see this as an enhancement, to have a line reader that always returns brand new buffers (in which case the line may or may not be immutable). EG: By ByDupLine ? Either that, or we simply keep using `byLine().map!"a.dup"` and `byLine().map!"a.idup"` That said, a `byDupLine` *is* a bit more user friendly, and helps limit levels of complexity in user code, as well as limits dependency on algorithm. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 06:33:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 13:33:00 +0000 (UTC) Subject: [Issue 10647] AutoImplement should implement overridden member functions with 'override' attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10647 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-17 06:32:58 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b92432cb7acb9c8a91b8d1b39f33595bac2d7953 Fix Issue 10647 https://github.com/D-Programming-Language/phobos/commit/30a67009e288b15f07a7c0bf6a98b6388e51f3a2 Merge branch 'master' into issue10647 https://github.com/D-Programming-Language/phobos/commit/d946bcd4ebf9b368063818286aa0a797fb6cbe86 Merge pull request #1414 from tom-tan/issue10647 Fix Issue 10647 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 06:33:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 13:33:16 +0000 (UTC) Subject: [Issue 10647] AutoImplement should implement overridden member functions with 'override' attributes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10647 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 08:22:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 15:22:27 +0000 (UTC) Subject: [Issue 10662] byLine!(Char, immutable Char) won't compile in git master In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10662 --- Comment #3 from monarchdodra at gmail.com 2013-07-17 08:22:26 PDT --- (In reply to comment #2) > I question whether or not this is a "rejects valid": byLine explicitly states > buffer re-use, so requesting a `ByLine!(immutable Char)` simply is not > possible. > > That said, I *would* see this as an enhancement, to have a line reader that > always returns brand new buffers (in which case the line may or may not be > immutable). > > EG: By ByDupLine ? > > Either that, or we simply keep using > `byLine().map!"a.dup"` > and > `byLine().map!"a.idup"` > > That said, a `byDupLine` *is* a bit more user friendly, and helps limit levels > of complexity in user code, as well as limits dependency on algorithm. In defense of the "ByDupLine" argument, one *BIG* advantage it can provide is that it can guarantee a single dup per front. `byLine().map!"a.dup`, on the other hand will call dup on every call to front. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 09:48:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 16:48:24 +0000 (UTC) Subject: [Issue 10662] byLine!(Char, immutable Char) won't compile in git master In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10662 --- Comment #4 from Nick Treleaven 2013-07-17 09:48:23 PDT --- (In reply to comment #2) > I question whether or not this is a "rejects valid": byLine explicitly states > buffer re-use, so requesting a `ByLine!(immutable Char)` simply is not > possible. Where does byLine state that? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 15:04:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 17 Jul 2013 22:04:47 +0000 (UTC) Subject: [Issue 10662] byLine!(Char, immutable Char) won't compile in git master In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10662 --- Comment #5 from monarchdodra at gmail.com 2013-07-17 15:04:45 PDT --- (In reply to comment #4) > (In reply to comment #2) > > I question whether or not this is a "rejects valid": byLine explicitly states > > buffer re-use, so requesting a `ByLine!(immutable Char)` simply is not > > possible. > > Where does byLine state that? Hum... I guess it doesn't actually state it (my bad). But even if un-documented, it is the "de facto" behavior, and the subject of countless threads on the boards. If (*if*) we accept that ByLine is designed as a range wrapper to "readln(_front)", then we should take into account that readln *does* document buffer re-use... That's my take on it anyways. I think adding support for this adds little value (IMO), and can only be exploited with a hard to use syntax. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 17:10:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 00:10:53 +0000 (UTC) Subject: [Issue 10663] New: Mixin int not converting Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10663 Summary: Mixin int not converting Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: trivial Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: alienballance at gmail.com --- Comment #0 from Mariusz Gliwi?ski 2013-07-17 17:10:51 PDT --- I know i should minimise it more, but i'm too tired already. And dpaste just stopped working :( DMD v2.063.2 [CODE] import std.conv; struct StateRunning{} struct StateDisposer{} template Declaration(uint idx, T) { enum Declaration = "const("~T.stringof~")* _s"~idx~";"; //text("const(",T.stringof,")* _s",idx,";"); } template DeclarationMulti(T...) { template Loop(string ret,size_t i,Args...) { static if( Args.length == 0 ) { enum Loop = ret; } else { enum Loop = Loop!(ret~Declaration!(i,Args[0])~"\n", i+1, Args[1..$]); } } enum DeclarationMulti = Loop!("",0,T); } struct State(T...) { mixin(DeclarationMulti!(T)); void test(T args) { foreach( i, arg; args ) { mixin("_s"~to!string(i)) = &arg; } } } void main(string[] args) { StateRunning r; StateDisposer d; State!(StateRunning,StateDisposer) s; s.test(r,d); } [/CODE] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 17:12:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 00:12:05 +0000 (UTC) Subject: [Issue 10663] Mixin int not converting In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10663 --- Comment #1 from Mariusz Gliwi?ski 2013-07-17 17:12:05 PDT --- That's the error: src/main.d(43): Error: semicolon expected, not 'EOF' src/main.d(48): Error: undefined identifier _s0, did you mean variable _s? src/main.d(48): Error: undefined identifier _s1, did you mean variable _s? src/main.d(57): Error: template instance nawia.main.State!(StateRunning, StateDisposer) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 17 18:24:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 01:24:42 +0000 (UTC) Subject: [Issue 10663] Mixin int not converting In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10663 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #2 from Kenji Hara 2013-07-17 18:24:41 PDT --- (In reply to comment #0) [snip] Problem is in Declaration template. > > template Declaration(uint idx, T) > { > enum Declaration = > "const("~T.stringof~")* _s"~idx~";"; // here > //text("const(",T.stringof,")* _s",idx,";"); > } It concatenates string ~ uint ~ string. When uint idx is 0, Declaration!(0, T) generates "const(StateRunning)* _s\0;" There's null character. Then, in mixin statement, dmd lexer extract null character as EOF token, and reports "semicolon expected, not 'EOF'" error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 00:17:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 07:17:28 +0000 (UTC) Subject: [Issue 10664] New: Win64: exception handling does not work with COMDAT folding Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10664 Summary: Win64: exception handling does not work with COMDAT folding Product: D Version: D1 & D2 Platform: x86_64 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-18 00:17:26 PDT --- Another excerpt from the phobos unittests: import core.exception; T collectException(T = Exception, E)(lazy E expression, ref E result) { try { result = expression(); } catch (T e) { return e; } return null; } void main() { int b; int foo() { throw new Exception("blah"); } assert(collectException(foo(), b)); int[] a = new int[3]; collectException!RangeError(a[4], b); } compile with "dmd -m64 test.d" and run: core.exception.RangeError at test(23): Range violation ---------------- 0x000007F627E337DF in rt.lifetime.__setArrayAllocLength at M:\s\d\rainers\drunti me\src\rt\lifetime.d(283) 0x000007F627E31508 in rt.lifetime._d_newarrayT at M:\s\d\rainers\druntime\src\rt \lifetime.d(781) 0x000007F627E31237 in test.main.__dgliteral12 0x000007F627E31197 in test.main.foo at M:\s\d\rainers\bugs\rs144\test.d(19) 0x000007F627E311E8 in test.main.foo 0x000007F627E310AA in D main at M:\s\d\rainers\bugs\rs144\test.d(20) 0x000007F627E32FDE in rt.dmain2._d_run_main.tryExec.printInfoBlock at M:\s\d\rai ners\druntime\src\rt\dmain2.d(556) 0x000007F627E3222E in rt.dmain2._d_run_main at M:\s\d\rainers\druntime\src\rt\dm ain2.d(469) 0x000007F627E330D6 in rt.dmain2._d_run_main.tryExec.print at M:\s\d\rainers\drun time\src\rt\dmain2.d(567) 0x000007F627E3222E in rt.dmain2._d_run_main at M:\s\d\rainers\druntime\src\rt\dm ain2.d(469) 0x000007F627E321CE in rt.dmain2._d_run_main at M:\s\d\rainers\druntime\src\rt\dm ain2.d(463) 0x000007F627E31276 in test.main.__dgliteral13 at M:\s\d\rainers\bugs\rs144\test. d(23) 0x000007F627E4AD0B in core.demangle.Demangle.parseType at M:\s\d\rainers\druntim e\src\core\demangle.d(862) 0x000007FB2EDF1832 in BaseThreadInitThunk 0x000007FB2EF8D609 in RtlUserThreadStart ---------------- It works with -g or more specifically with dmd -m64 -L/OPT:NOICF test.d So it seems exception information for the two collectException instantiations are merged. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 01:41:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 08:41:10 +0000 (UTC) Subject: [Issue 9340] Covariant return type conflicts with out contract. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9340 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara 2013-07-18 01:41:09 PDT --- *** This issue has been marked as a duplicate of issue 10479 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 01:41:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 08:41:12 +0000 (UTC) Subject: [Issue 10479] cannot pass implicitly to base class casted result to out contract by ref In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10479 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |epi at atari8.info --- Comment #3 from Kenji Hara 2013-07-18 01:41:09 PDT --- *** Issue 9340 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: ------- From d-bugmail at puremagic.com Thu Jul 18 04:28:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 11:28:56 +0000 (UTC) Subject: [Issue 10665] New: The documentation produced by ddoc should clearly list all public imports of a module Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10665 Summary: The documentation produced by ddoc should clearly list all public imports of a module Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-18 04:28:54 PDT --- An idea by Timothee Cour. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 06:42:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 13:42:06 +0000 (UTC) Subject: [Issue 10616] class C: C.D{static class D{}} does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10616 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #1 from Andrej Mitrovic 2013-07-18 06:42:00 PDT --- That's a borderline enhancement request. It might potentially break code too, e.g. this currently works: ----- class D { } class C : D { static class D { } } ----- With the enhancement this would have to become a conflict, although the workaround would be easy: one could use 'class C : .D' (dot expression) for the global class and 'class C : D' for the nested one. But I'm not fond of such lookup rules where something in an inner scope ends up conflicting with an expression in an outer scope. Well I don't think I've ever tried to use either of these samples so I don't have a strong opinion either way. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 07:00:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 14:00:01 +0000 (UTC) Subject: [Issue 10666] New: Regresion (2.064 git-head, 2.053+): Appender does not work with a RefCounted type Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10666 Summary: Regresion (2.064 git-head, 2.053+): Appender does not work with a RefCounted type Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-18 06:59:59 PDT --- ----- import std.array; import std.typecons; struct T { } struct S { RefCounted!T data; } void main() { Appender!(S[]) arr; arr.put(S()); } ----- 2.064: $ dmd test.d > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\array.d(2287): Error: variable std.array.Appender!(S[]).Appender.put!(S).put.item has scoped destruction, cannot build closure However there is another bug in earlier releases: 2.063: $ dmd test.d $ test.exe On win32 this crashes with a dialog box: ----- [Window Title] test.exe [Main Instruction] test.exe has stopped working [Content] A problem caused the program to stop working correctly. Please close the program. [Close the program] [Debug the program] ----- I've traced down the first version that crashes: 2.053: > Crash Earlier releases simply have an assertion failure: 2.052: > core.exception.AssertError at std.typecons(2351): Assertion failure The code which failed there is: ----- assert(RefCounted._store._count > 0); ----- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 07:18:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 14:18:57 +0000 (UTC) Subject: [Issue 10452] CTFE: Cannot compare delegates with == or 'is' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10452 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |CTFE, rejects-valid Summary|CTFE: if(x is null) Error: |CTFE: Cannot compare |cannot compare __lambda1 at |delegates with == or 'is' |compile time | Severity|enhancement |normal --- Comment #1 from Don 2013-07-18 07:18:55 PDT --- This isn't an enhancement, it's a bug. All forms of delegate (null, delegate literal, nested function, struct member, class member) should be comparable with == and 'is'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 08:08:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 15:08:29 +0000 (UTC) Subject: [Issue 10662] byLine!(Char, immutable Char) won't compile in git master In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10662 Nick Treleaven changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rejects-valid | --- Comment #6 from Nick Treleaven 2013-07-18 08:08:27 PDT --- (In reply to comment #2) > I question whether or not this is a "rejects valid" I suppose it's arguable, so I've now removed the rejects-valid keyword. (I think it did work before the readln(buf) change though). > That said, I *would* see this as an enhancement, to have a line reader that > always returns brand new buffers (in which case the line may or may not be > immutable). I have some ideas about other solutions, I will post something to the NG next week. I can't see how fixing this bug would be undesirable, but I agree byLine!(char, immutable char) is awkward syntax (I have an idea how to improve it). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 10:53:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 17:53:28 +0000 (UTC) Subject: [Issue 10616] class C: C.D{static class D{}} does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10616 --- Comment #2 from timon.gehr at gmx.ch 2013-07-18 10:53:27 PDT --- (In reply to comment #1) > That's a borderline enhancement request. No, it is a bug report. C.D is a perfectly fine base class. > It might potentially break code too, > e.g. this currently works: > > ----- > class D > { > } > > class C : D > { > static class D > { > } > } > ----- > > With the enhancement this would have to become a conflict, I am not arguing for any enhancement that would change the meaning of the above code. > although the > workaround would be easy: one could use 'class C : .D' (dot expression) for the > global class and 'class C : D' for the nested one. But I'm not fond of such > lookup rules where something in an inner scope ends up conflicting with an > expression in an outer scope. > ... I generally like shadowing, but it would indeed be utterly pointless to look up a classes' parents inside its own scope. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 13:14:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 20:14:31 +0000 (UTC) Subject: [Issue 10616] class C: C.D{static class D{}} does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10616 --- Comment #3 from Andrej Mitrovic 2013-07-18 13:14:30 PDT --- (In reply to comment #2) > I am not arguing for any enhancement that would change the meaning of the above > code. Ah, so you want this to work: class C: C.D{static class D{}} but this to fail: class C: D{static class D{}} And the following would stay as-is: class D { } class C: D{static class D{}} // inherits global D If that's so then this is reasonable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 13:18:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 18 Jul 2013 20:18:46 +0000 (UTC) Subject: [Issue 10639] Win64: wrong optimizer codegen with struct literal with complex fields In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10639 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com Version|D2 |D1 & D2 OS/Version|Windows |All Severity|normal |major --- Comment #1 from Walter Bright 2013-07-18 13:18:45 PDT --- https://github.com/D-Programming-Language/dmd/pull/2359 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 18 19:46:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 02:46:31 +0000 (UTC) Subject: [Issue 10667] New: http://dlang.org/cppstrings.html benchmark example doesn't really show off slices Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10667 Summary: http://dlang.org/cppstrings.html benchmark example doesn't really show off slices Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nobody at puremagic.com ReportedBy: jlquinn at optonline.net --- Comment #0 from Jerry Quinn 2013-07-18 19:46:29 PDT --- While the wordcount benchmark programs do show what can be done with C++98 vs D2, this is not really a good demonstration of the performance benefits of slices. The D program stores word counts in a hash map. The C++ version given uses a map, which is required to be a balanced binary tree data structure. For sizable input, the algorithmic advantage will swamp the savings from using slices. This is also a small enough input that memory handling effects probably won't get noticed. I suspect the D program never needs to run a GC cleanup before the end. I highly suggest the C++ programs be converted to C++11 where unordered_map is available to remove the hidden algorithmic advantage. Secondly, repeat the input a number of times so the timing is more meaningful. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 00:11:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 07:11:33 +0000 (UTC) Subject: [Issue 10639] Win64: wrong optimizer codegen with struct literal with complex fields In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10639 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-19 00:11:32 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a3d33e3937d42fdead489a7f04413583f4451491 fix Issue 10639 - Win64: wrong optimizer codegen with struct literal with complex fields https://github.com/D-Programming-Language/dmd/commit/de687981f72b0256b1dc1233306b4cfe94db626c Merge pull request #2359 from WalterBright/fix10639 fix Issue 10639 - Win64: wrong optimizer codegen with struct literal with complex fields -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 00:47:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 07:47:55 +0000 (UTC) Subject: [Issue 10452] CTFE: Cannot compare delegates with == or 'is' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10452 --- Comment #2 from Don 2013-07-19 00:47:54 PDT --- https://github.com/D-Programming-Language/dmd/pull/2360 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 00:51:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 07:51:08 +0000 (UTC) Subject: [Issue 10644] Win64: wrong code when passing arguments through ... In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10644 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-19 00:51:07 PDT --- This shrinks down to: --------------------- import std.c.stdio; import std.c.stdarg; void vpr(string format, va_list args) { char[128] buffer; int count; auto f = format.ptr; auto p = buffer.ptr; auto psize = buffer.length; printf("format = %d, %s\n", cast(int)format.length, f); count = _vsnprintf(p,psize,f,args); printf("count = %d, p = %s\n", count, p); } void pr(string format, ...) { va_list ap; ap = cast(va_list)&format; ap += format.sizeof; vpr(format, ap); } void main() { pr("%d", 42); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 01:09:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 08:09:15 +0000 (UTC) Subject: [Issue 9546] getProtection trait does not work with mixin or getMember In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9546 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Kenji Hara 2013-07-19 01:09:14 PDT --- https://github.com/D-Programming-Language/dmd/pull/2361 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 01:56:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 08:56:07 +0000 (UTC) Subject: [Issue 10668] New: Unicode characters, when taken from strings, are not printed correctly Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10668 Summary: Unicode characters, when taken from strings, are not printed correctly Product: D Version: D2 Platform: x86_64 OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: MATTCA at sky.com --- Comment #0 from Matt Carter 2013-07-19 01:55:53 PDT --- Created an attachment (id=1234) A small program which demonstrates the issue. When obtaining a char from within a string of non-ASCII characters (in this example, the pound sign '?'), the resulting char will not be printed correctly to the console (via std.stdio.writeln). Instead, the '?' symbol is printed. However, when printing the entire string, the '?' is printed correctly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 01:58:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 08:58:31 +0000 (UTC) Subject: [Issue 10668] Unicode characters, when taken from strings (as char), are not printed correctly In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10668 --- Comment #1 from Matt Carter 2013-07-19 01:58:27 PDT --- The content of the attachment, just in case: module main; import std.stdio; void main(string[] args) { string s = "???"; writeln(s); // Output: ??? char c = s[0]; writeln(c); // Output: ? writeln(s[0]); // Output: ? } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 02:23:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 09:23:37 +0000 (UTC) Subject: [Issue 10669] New: CTFE: using initialized static const class member no longer works Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10669 Summary: CTFE: using initialized static const class member no longer works Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-19 02:23:36 PDT --- This code used to compile until recently: /////////////////////////// struct S { uint x; } static const S iid0 = S(0); class C { static const S iid1 = S(1); }; const S IID0 = iid0; // works const S IID1 = C.iid1; // Line 11: fails //////////////////////////// current git head now reports: test.d(7): Error: cannot evaluate S(1) at compile time. Circular reference? test.d(11): while evaluating iid1.init I guess this is related to changes regarding const class members. IIRC the code should still work if an initializer exists. As a side note, I think the error message should not report "cannot evaluate S(1)", but "cannot evaluate iid1". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 02:41:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 09:41:49 +0000 (UTC) Subject: [Issue 10668] Unicode characters, when taken from strings (as char), are not printed correctly In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10668 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |monarchdodra at gmail.com Resolution| |INVALID --- Comment #2 from monarchdodra at gmail.com 2013-07-19 02:41:47 PDT --- Well... what did you think it was going to print? you have a utf-8 sequence. char c = s[0]; will extract the first code*point* of your unicode. You want the first code*unit*. http://www.fileformat.info/info/unicode/char/a3/index.htm EG: ? is the codepoint "AE" In UTF8 it is represented by the sequence: [0xC2, 0xA3] When you write "char c = s[0];", you are extracting the first codeunit, which is 0xC2. When you pass this to to writeln, what will happen will mostly depend on your locale/codepage. If it is set to UF8 (CP65001 on windows), then it will print the "unknown character", since it you passed an incomplete sequence. The correct code you want is: dchar c = s.front; (remember to include std.array to front). Another alternative, is to simply work from the ground up with dstrings. module main; import std.stdio; void main(string[] args) { dstring s = "???"; writeln(s); // Output: ??? dchar c = s[0]; writeln(c); // Output: ? writeln(s[0]); // Output: ? } Do you have access to "The D Programming Language"? It has the best introduction to unicode/UTF I've read. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 02:49:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 09:49:06 +0000 (UTC) Subject: [Issue 10583] DMD 2.063 dumps core with mixins involving __traits(getProtection, .. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10583 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull --- Comment #1 from Kenji Hara 2013-07-19 02:49:03 PDT --- https://github.com/D-Programming-Language/dmd/pull/2362 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 03:07:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 10:07:11 +0000 (UTC) Subject: [Issue 10670] New: std.algorithm.reduce: no-seed initialization wrong design Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10670 Summary: std.algorithm.reduce: no-seed initialization wrong design Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: monarchdodra at gmail.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-19 03:07:10 PDT --- reduce has a "no-seed" implementation provided: "The one-argument version $(D reduce!fun(range)) works similarly, but it uses the first element of the range as the seed (the range must be non-empty)." I question this design as invalid: The first element is never passed through the transform function. There is no reason it be given any "special treatment". Here is a trivial example of why the design is (IMO) wrong: //---- import std.stdio, std.algorithm, std.range; void main(string[] args) { auto arr = [1, 1]; auto sumDoubles1 = reduce!"a + 2*b"(0, arr); auto sumDoubles2 = reduce!"a + 2*b"(arr); writeln(sumDoubles1); //4 writeln(sumDoubles2); //3 (!) } //---- I really can't see any universe where you could justify that return value... The correct seed value should be "Seed seed = fun(Seed.init, r.front)": This means the first element is correctly "processed". Of course, doing this really just boils down to seed being Seed.init. An added "bonus" is that it makes simple "isIterable" types much more efficient, as they don't have to check "isInitialized" on every iteration. -------- Unsure if this is "ER", "wrong-code" or what. Not sure if changing the behavior is acceptable (IMO, it should be). I was re-writing reduce already, so please provide your feedback on the issue so that I can take it into account :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 04:20:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 11:20:34 +0000 (UTC) Subject: [Issue 10671] New: Stack unwinding is insufficient on Linux x86_64. (-fomit-frame-pointer) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10671 Summary: Stack unwinding is insufficient on Linux x86_64. (-fomit-frame-pointer) Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: Marco.Leise at gmx.de --- Comment #0 from Marco Leise 2013-07-19 04:20:32 PDT --- Here is the catch: Druntime's stack unwinding code relies on frame pointers. Optimized gcc code (at any opt. level > 0) doesn't contain frame pointers. (Unless the architecture requires it for debugging, like x86 or -fno-omit-frame-pointer is given.) That means that using any Linux x86-64 libraries that take callbacks into D results in broken exception handling! Unless the maintainers of a specific distribution added -fno-omit-frame-pointer. You cannot expect that on Gentoo for example. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 04:29:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 11:29:46 +0000 (UTC) Subject: [Issue 10672] New: struct initializer treated as lambda literal Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10672 Summary: struct initializer treated as lambda literal Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: public at dicebot.lv --- Comment #0 from Dicebot 2013-07-19 04:29:45 PDT --- Confusing example that breaks "looks like C, acts like C" rule. ---------------------------- struct foo { int i; }; foo[] blah = [ { 1 }, { 2 } ]; // fine void main() { foo[] blah = [ { 1 }, { 2 } ]; // Error: array initializers as expressions are not allowed } ---------------------------- This probably happens because assigning a lambda literal has higher precedence in grammar than struct initializer. However, difference between global initialization with forced compile-time evaluation and normal initialization should be extremely confusing. Especially for people coming from C/C++. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 04:33:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 11:33:09 +0000 (UTC) Subject: [Issue 10673] New: memory corruption in interpret.c Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10673 Summary: memory corruption in interpret.c Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: code at dawg.eu --- Comment #0 from Martin Nowak 2013-07-19 04:33:08 PDT --- During a compilation I kept triggering the following assertion. assert(e != EXP_CONTINUE_INTERPRET && e != EXP_BREAK_INTERPRET); https://github.com/D-Programming-Language/dmd/blob/de687981f72b0256b1dc1233306b4cfe94db626c/src/interpret.c#L976 While trying to reduce the test case it turned out that this must be a memory corruption, i.e. with ASLR it only asserts sometimes. When I removed unrelated modules from the compilation the error would go away. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 04:42:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 11:42:43 +0000 (UTC) Subject: [Issue 10673] memory corruption in interpret.c In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10673 --- Comment #1 from Martin Nowak 2013-07-19 04:42:42 PDT --- valgrind ../dmd/src/dmd -I../druntime/import -w -d -property -m32 -fPIC -g -debug -shared -unittest -ofgenerated/linux/debug/32/unittest/libphobos2-ut.so crc32.d std/algorithm.d std/array.d std/ascii.d std/container.d std/conv.d std/cstream.d std/csv.d std/datetime.d std/demangle.d std/encoding.d std/exception.d std/file.d std/format.d std/functional.d std/getopt.d std/md5.d std/metastrings.d std/mmfile.d std/regex.d ../druntime/lib/libdruntime-linux32so.a -defaultlib= -debuglib= ==4040== Memcheck, a memory error detector ==4040== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==4040== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==4040== Command: ../dmd/src/dmd -I../druntime/import -w -d -property -m32 -fPIC -g -debug -shared -unittest -ofgenerated/linux/debug/32/unittest/libphobos2-ut.so crc32.d std/algorithm.d std/array.d std/ascii.d std/container.d std/conv.d std/cstream.d std/csv.d std/datetime.d std/demangle.d std/encoding.d std/exception.d std/file.d std/format.d std/functional.d std/getopt.d std/md5.d std/metastrings.d std/mmfile.d std/regex.d ../druntime/lib/libdruntime-linux32so.a -defaultlib= -debuglib= ==4040== The 'crc32' module has been scheduled for deprecation. Please use 'std.digest.crc' instead. std.md5 is scheduled for deprecation. Please use std.digest.md instead ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51D30A: BreakStatement::interpret(InterState*) (interpret.c:1391) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D9B0: SwitchStatement::interpret(InterState*) (interpret.c:1635) ==4040== by 0x51D69E: ForStatement::interpret(InterState*) (interpret.c:1533) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D69E: ForStatement::interpret(InterState*) (interpret.c:1533) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51D30A: BreakStatement::interpret(InterState*) (interpret.c:1391) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C7CF: UnrolledLoopStatement::interpret(InterState*) (interpret.c:1096) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D9B0: SwitchStatement::interpret(InterState*) (interpret.c:1635) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D69E: ForStatement::interpret(InterState*) (interpret.c:1533) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51C81F: UnrolledLoopStatement::interpret(InterState*) (interpret.c:1109) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D9B0: SwitchStatement::interpret(InterState*) (interpret.c:1635) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D69E: ForStatement::interpret(InterState*) (interpret.c:1533) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x51C6C0: ExpStatement::interpret(InterState*) (interpret.c:1044) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51C824: UnrolledLoopStatement::interpret(InterState*) (interpret.c:1109) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D9B0: SwitchStatement::interpret(InterState*) (interpret.c:1635) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D69E: ForStatement::interpret(InterState*) (interpret.c:1533) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x51C6C0: ExpStatement::interpret(InterState*) (interpret.c:1044) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51D8CF: SwitchStatement::interpret(InterState*) (interpret.c:1639) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D69E: ForStatement::interpret(InterState*) (interpret.c:1533) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x51C6C0: ExpStatement::interpret(InterState*) (interpret.c:1044) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51D8D4: SwitchStatement::interpret(InterState*) (interpret.c:1639) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51D69E: ForStatement::interpret(InterState*) (interpret.c:1533) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x51C6C0: ExpStatement::interpret(InterState*) (interpret.c:1044) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51D78F: ForStatement::interpret(InterState*) (interpret.c:1541) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x51C6C0: ExpStatement::interpret(InterState*) (interpret.c:1044) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x526BE3: CommaExp::interpret(InterState*, CtfeGoal) (interpret.c:4787) ==4040== ==4040== Conditional jump or move depends on uninitialised value(s) ==4040== at 0x51D794: ForStatement::interpret(InterState*) (interpret.c:1541) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x51C6C0: ExpStatement::interpret(InterState*) (interpret.c:1044) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x51C740: CompoundStatement::interpret(InterState*) (interpret.c:1071) ==4040== by 0x5238F5: FuncDeclaration::interpret(InterState*, Array*, Expression*) (interpret.c:954) ==4040== by 0x52553D: CallExp::interpret(InterState*, CtfeGoal) (interpret.c:4713) ==4040== by 0x526BE3: CommaExp::interpret(InterState*, CtfeGoal) (interpret.c:4787) ==4040== dmd: interpret.c:976: Expression* FuncDeclaration::interpret(InterState*, Expressions*, Expression*): Assertion `e != EXP_CONTINUE_INTERPRET && e != EXP_BREAK_INTERPRET' failed. ==4040== ==4040== HEAP SUMMARY: ==4040== in use at exit: 3,864,184,382 bytes in 8,707,602 blocks ==4040== total heap usage: 11,232,324 allocs, 2,524,722 frees, 7,045,249,464 bytes allocated ==4040== ==4040== LEAK SUMMARY: ==4040== definitely lost: 319,193,003 bytes in 3,779,713 blocks ==4040== indirectly lost: 42,443,969 bytes in 596,896 blocks ==4040== possibly lost: 3,472,644,660 bytes in 4,150,273 blocks ==4040== still reachable: 29,902,750 bytes in 180,720 blocks ==4040== suppressed: 0 bytes in 0 blocks ==4040== Rerun with --leak-check=full to see details of leaked memory ==4040== ==4040== For counts of detected and suppressed errors, rerun with: -v ==4040== Use --track-origins=yes to see where uninitialised values come from ==4040== ERROR SUMMARY: 10 errors from 8 contexts (suppressed: 2 from 2) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 04:50:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 11:50:17 +0000 (UTC) Subject: [Issue 10673] memory corruption in interpret.c In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10673 Martin Nowak changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Severity|normal |regression --- Comment #2 from Martin Nowak 2013-07-19 04:50:17 PDT --- This is a regression introduced with the fix to bug 10475. https://github.com/D-Programming-Language/dmd/pull/2363 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 04:52:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 11:52:30 +0000 (UTC) Subject: [Issue 10628] [REG2.063] spurious "hidden by" deprecation warning In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10628 --- Comment #2 from Kenji Hara 2013-07-19 04:52:28 PDT --- Superseded compiler fix: https://github.com/D-Programming-Language/dmd/pull/2362 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 05:42:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 12:42:11 +0000 (UTC) Subject: [Issue 7364] Better Eponymous Template syntax In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7364 --- Comment #9 from Nick Treleaven 2013-07-19 05:42:08 PDT --- It might be easier to implement (particularly for templates resolving to functions) if we didn't reuse a keyword. Perhaps use __self: template longNameWithSpecializations { void __self(){...} void __self(int i){...} } The compiler can replace __self with the innermost template name. A nice side effect might be anonymous lambda recursion: a => a > 2 ? a * __self(a - 1) : a I think lambdas are implemented as templates, so the above feature might work naturally. Eventually it would be nice if error messages used myTemplate.__self instead of myTemplate.myTemplate. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 06:08:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 13:08:53 +0000 (UTC) Subject: [Issue 10398] Dmd bugs detected by memcheck when compile druntime+phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10398 Martin Nowak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code at dawg.eu --- Comment #1 from Martin Nowak 2013-07-19 06:08:51 PDT --- What were your compiler arguments and input source files? Being able to reproduce the error is necessary to fix any bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 07:00:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 14:00:30 +0000 (UTC) Subject: [Issue 10673] memory corruption in interpret.c In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10673 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-19 07:00:29 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ea416a3496467ba4ccf875c70e76873a322d92ba fix Issue 10673 - memory corruption in interpret.c - the gotoTarget field of LabelStatement was never initialized https://github.com/D-Programming-Language/dmd/commit/e9fdb8c4527c2c3f7e080fad9d21dd4f4710488f Merge pull request #2363 from dawgfoto/fix10673 fix Issue 10673 - memory corruption in interpret.c -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 07:00:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 14:00:42 +0000 (UTC) Subject: [Issue 10673] memory corruption in interpret.c In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10673 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 07:34:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 14:34:44 +0000 (UTC) Subject: [Issue 10670] std.algorithm.reduce: no-seed initialization wrong design In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10670 Peter Neubauer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |peterneubauer2 at gmail.com --- Comment #1 from Peter Neubauer 2013-07-19 07:34:43 PDT --- float.init is nan, so this change would require all (float[]).reduce!"a+b" calls to be rewritten with an explicit seed. I imagine that this is a relatively common use case, while I've never had to reduce!"a+2b" anything. Users of the latter case should get the burden of the explicit seed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 07:48:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 14:48:18 +0000 (UTC) Subject: [Issue 10674] New: getopt does not work for enum type Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10674 Summary: getopt does not work for enum type Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: ttanjo at gmail.com --- Comment #0 from Tomoya Tanjo 2013-07-19 07:48:17 PDT --- In the document of std.getopt.getopt it recognizes enum types but the following code does not work in dmd v2.064-devel-de68798 on Linux 64bit. --- import std.getopt; void main() { auto args = ["--color=yes"]; // The following code is in the document of getopt enum Color { no, yes } Color color; // default initialized to Color.no getopt(args, "color", &color); assert(color == Color.yes); // failed! } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 07:59:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 14:59:09 +0000 (UTC) Subject: [Issue 10668] Unicode characters, when taken from strings (as char), are not printed correctly In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10668 Nils changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nilsbossung at googlemail.com --- Comment #3 from Nils 2013-07-19 07:59:08 PDT --- (In reply to comment #2) > Well... what did you think it was going to print? you have a utf-8 sequence. > char c = s[0]; will extract the first code*point* You mean code*unit*. > of your unicode. You want the first code*unit*. code*point* -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 08:01:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 15:01:30 +0000 (UTC) Subject: [Issue 10674] getopt does not work for enum type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10674 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |hsteoh at quickfur.ath.cx Resolution| |INVALID --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-19 08:01:30 PDT --- The problem is that args[0] is expected to be the program name, so std.getopt does not try to parse it as an option. If you replace the declaration of args with this: auto args = ["program.exe", "--color=yes"]; then the code works as expected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 08:07:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 15:07:58 +0000 (UTC) Subject: [Issue 10670] std.algorithm.reduce: no-seed initialization wrong design In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10670 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #2 from hsteoh at quickfur.ath.cx 2013-07-19 08:07:58 PDT --- I've run into this issue before. I agree that if no seed value is provided, it should use ElementType!range.init, NOT range.front. In the case of floats, well... I'd argue that using the seedless variety of reduce on a float range is already a bug, so it should be fixed anyway. Alternatively, since float.init is always NaN, it makes no sense to use the seedless variety of reduce, so we could just static assert(false) if isFloatingPointType!(ElementType!range). This will break existing code but at least it will point out why the code is breaking, instead of silently changing whatever the current behaviour is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 08:15:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 15:15:57 +0000 (UTC) Subject: [Issue 10660] ddoc on std.algorithm: Cheat sheet description for 'filter' is wrong In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10660 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |hsteoh at quickfur.ath.cx --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-19 08:15:56 PDT --- https://github.com/D-Programming-Language/phobos/pull/1422 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 08:24:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 15:24:58 +0000 (UTC) Subject: [Issue 10668] Unicode characters, when taken from strings (as char), are not printed correctly In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10668 --- Comment #4 from Matt Carter 2013-07-19 08:24:57 PDT --- (In reply to comment #2) > Well... what did you think it was going to print? you have a utf-8 sequence. > char c = s[0]; will extract the first code*point* of your unicode. You want the > first code*unit*. > > http://www.fileformat.info/info/unicode/char/a3/index.htm > EG: ? is the codepoint "AE" > In UTF8 it is represented by the sequence: [0xC2, 0xA3] > > When you write "char c = s[0];", you are extracting the first codeunit, which > is 0xC2. When you pass this to to writeln, what will happen will mostly depend > on your locale/codepage. If it is set to UF8 (CP65001 on windows), then it will > print the "unknown character", since it you passed an incomplete sequence. > > The correct code you want is: > dchar c = s.front; > > (remember to include std.array to front). > > Another alternative, is to simply work from the ground up with dstrings. > > module main; > > import std.stdio; > > void main(string[] args) { > dstring s = "???"; > writeln(s); // Output: ??? > > dchar c = s[0]; > writeln(c); // Output: ? > > writeln(s[0]); // Output: ? > } > > Do you have access to "The D Programming Language"? It has the best > introduction to unicode/UTF I've read. Thanks for the response! Yeah, I converted my project to use dstrings on the off chance it worked after posting, lo-behold this is the fix it seems. I plan on eventually getting the book, although I've read some bad reviews regarding the e-book/kindle version, so I'm having to wait a little longer to get a hard copy. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 08:28:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 15:28:23 +0000 (UTC) Subject: [Issue 10668] Unicode characters, when taken from strings (as char), are not printed correctly In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10668 --- Comment #5 from monarchdodra at gmail.com 2013-07-19 08:28:23 PDT --- (In reply to comment #3) > (In reply to comment #2) > > Well... what did you think it was going to print? you have a utf-8 sequence. > > char c = s[0]; will extract the first code*point* > > You mean code*unit*. > > > of your unicode. You want the first code*unit*. > > code*point* Oops. Massive face-palm. Thank you for correcting me. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 08:41:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 15:41:50 +0000 (UTC) Subject: [Issue 10668] Unicode characters, when taken from strings (as char), are not printed correctly In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10668 --- Comment #6 from monarchdodra at gmail.com 2013-07-19 08:41:49 PDT --- (In reply to comment #4) > Thanks for the response! Yeah, I converted my project to use dstrings on the > off chance it worked after posting, lo-behold this is the fix it seems. > > I plan on eventually getting the book, although I've read some bad reviews > regarding the e-book/kindle version, so I'm having to wait a little longer to > get a hard copy. I'd recommend trying to get your project to work with "normal UTF8" strings. They're the norm in D, and you'll have to get around to understanding how they work sooner or later. To make it *really* simple, a UTF-8 string should be handled like a bidirectional range of dchars. You can ask for front/back, popFront/popBack, and empty. Stick to only these primitives, and your code is *guaranteed* to work. All the other primitives (length, index, slice), while *present* require much more knowledge of what is going on, and should be used only when you *know* what you are doing. As a matter of fact, if you ask a string if it supports, say length: "hasLength!string": it will say "false". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 09:46:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 16:46:05 +0000 (UTC) Subject: [Issue 10398] Dmd bugs detected by memcheck when compile druntime+phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10398 --- Comment #2 from Maxim Fomin 2013-07-19 09:46:00 PDT --- Created an attachment (id=1235) Valgrind output -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 09:49:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 16:49:22 +0000 (UTC) Subject: [Issue 10398] Dmd bugs detected by memcheck when compile druntime+phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10398 --- Comment #3 from Maxim Fomin 2013-07-19 09:49:20 PDT --- (In reply to comment #1) > What were your compiler arguments and input source files? Being able to > reproduce the error is necessary to fix any bug. 1) go to druntime/posix.mak 2) replace approx. line 32 with 'DMD?= valgrind dmd' 3) to to phobos/posix.mak 4) replace approx line 99 with 'DMD ?= valgrind dmd' This will print memory errors during full druntime + phobos compilation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 11:11:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 18:11:15 +0000 (UTC) Subject: [Issue 10258] Add hasAccess trait In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10258 --- Comment #5 from Kenji Hara 2013-07-19 11:11:13 PDT --- I think hasAccess traits would be completely redundant feature. We can use __traits(compiles) + __traits(getMember). module a; struct S { int x; private int y; } module b; import a; void getValues(T)(T t) { import std.stdio; foreach (name; __traits(allMembers, T)) { static if (__traits(compiles, __traits(getMember, t, name))) writeln(name, ": ", mixin("t."~name)); } } void main() { S s; getValues(s); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 11:39:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 18:39:00 +0000 (UTC) Subject: [Issue 10258] Add hasAccess trait In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10258 --- Comment #6 from Jonathan M Davis 2013-07-19 11:38:58 PDT --- If what you really need to check is whether code has access to a particular symbol (as opposed to whether using it works), then it would be much more idiomatic if there were a trait for it rather than combining __traits(compiles, ...) with __traits(getMember, ...). So, from the standpoint of code clarity, a trait would be preferable. However, in most cases, I would think that it would be better to check whether using a symbol works rather than checking whether it's accessible, since that's generally what you care about. But if we have a strong enough use case for checking explicitly for access, then I think that it would be better to have trait for it because of what it gives you in code clarity. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 13:20:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 20:20:18 +0000 (UTC) Subject: [Issue 10675] New: [Optimizer] optimize x >= a && x <= b and such to one comparison Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10675 Summary: [Optimizer] optimize x >= a && x <= b and such to one comparison Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: dmitry.olsh at gmail.com --- Comment #0 from Dmitry Olshansky 2013-07-19 13:20:16 PDT --- Currently DMD doesn't optimize interval-style conditions unlike GDC & LDC: x >= a && x <= b ---> //val size has to be big enough for the entire range of [0, b] unsigned val = x - a; val <= b - a The are multitude of alternatives of the above including if/else if chains and/or seuqnce of ifs with early return like: if(x < a) return false; if(x <= b return true; return false; See current (soon to be replaced) std.uni: https://github.com/D-Programming-Language/phobos/blob/master/std/uni.d#L563 Typical use-case are ASCII isAlpha/isDigit etc. functions heavily used in various lexers/scanners. See little "benchmark". Timings are dominated by loop overhead and memory access but a significant difference is observable non the less. import std.file; import std.stdio, std.datetime; //let compiler optimize if/else size_t process1(void[] buf) { size_t cnt = 0; foreach(i; 0..100) foreach(c; cast(ubyte[])buf) { if(c < 0xAA) { if(c < 'A') { } else if(c <= 'Z') cnt++; else if(c < 'a') { } else if(c <= 'z') cnt++; } } return cnt; } //do our job by hand size_t process2(void[] buf) { size_t cnt = 0; foreach(i; 0..100) foreach(c; cast(ubyte[])buf) { if(c < 0xAA) { //these x and y should be the smallest unsigned type to fit the range size_t x = c - 'A'; if(x <= 'Z'-'A') cnt++; else{ size_t y = c - 'a'; if(y <= 'z' - 'a') cnt++; } } } return cnt; } void main(string argv[]) { foreach(v; argv[1..$]){ StopWatch sw; sw.start(); version(compiler){ auto count = process1(read(v)); } else version(manual) auto count = process2(read(v)); else static assert(0); sw.stop(); writefln("%s %s ASCII alphabetic. [%d us]", v, count, sw.peek().usecs); } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 13:22:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 20:22:01 +0000 (UTC) Subject: [Issue 10675] [Optimizer] optimize x >= a && x <= b and such to one comparison In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10675 --- Comment #1 from Dmitry Olshansky 2013-07-19 13:22:00 PDT --- Created an attachment (id=1236) Disassembly of test case Disassembly of 2 critical if-chainy functions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 13:23:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 20:23:24 +0000 (UTC) Subject: [Issue 10675] [Optimizer] optimize x >= a && x <= b and such to one comparison In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10675 --- Comment #2 from Dmitry Olshansky 2013-07-19 13:23:23 PDT --- Aye, and compiler flags used. First version: dmd -release -O -inline -noboundscheck -version=compiler if_else_opt.d Optimized by hand version: dmd -release -O -inline -noboundscheck -version=manual if_else_opt.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 14:08:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 21:08:57 +0000 (UTC) Subject: [Issue 10258] Add hasAccess trait In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10258 --- Comment #7 from Andrej Mitrovic 2013-07-19 14:08:55 PDT --- (In reply to comment #5) > I think hasAccess traits would be completely redundant feature. This isn't a good workaround for two reasons: 1. It is not clear enough what is being done (same as JMD's argument) 2. __traits(compiles) silences all compiler errors. #2 is the most important reason. Here's an example: ----- struct S { int a; } void main() { static if (__traits(compiles, __traits(getMember, T, "a"))) { pragma(msg, "Can access a!"); } } ----- This will not print anything, because the aggregate type is wrong (it doesn't even exist!). It should have been 'S', not 'T', but __traits(compiles) has gagged the error message. Tracking down bugs like these are hard when there are no error messages. If instead we had a trait, the above would become: ----- static if (__traits(hasAccess, __traits(getMember, T, "b"))) ----- And the error message is clear: > Error: undefined identifier T, did you mean struct S? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 14:19:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 21:19:45 +0000 (UTC) Subject: [Issue 10644] Win64: wrong code when passing arguments through ... In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10644 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Component|DMD |Phobos Platform|All |x86_64 OS/Version|All |Windows --- Comment #2 from Walter Bright 2013-07-19 14:19:44 PDT --- https://github.com/D-Programming-Language/phobos/pull/1423 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 14:25:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 21:25:34 +0000 (UTC) Subject: [Issue 10639] Win64: wrong optimizer codegen with struct literal with complex fields In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10639 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-19 14:25:33 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6f38739b45f65f1173db4401fdb88c583937fd76 Merge pull request #2359 from WalterBright/fix10639 fix Issue 10639 - Win64: wrong optimizer codegen with struct literal with complex fields -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 14:50:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 21:50:14 +0000 (UTC) Subject: [Issue 10462] interface thunk doesn't preserve EBX In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10462 --- Comment #6 from Martin Nowak 2013-07-19 14:50:12 PDT --- The fix seems to work but I found another corner case. Calling an interface thunk through a delegate still crashes. ---- cat > bug.d << CODE void call(int delegate() dg) { assert(dg() == 7); } interface I { int opCall(); } class C : I { int opCall() { return 7; } } void test() { I i = new C; call(&i.opCall); } CODE cat > main.d << CODE import bug; void main() { bug.test(); } CODE ${DMD} -g -m32 -fPIC -shared bug.d -oflibbug.so ${DMD} -g -m32 main.d -L-L. -L-lbug -L-rpath=. ./main ---- The code generated to call the delegate trashes EBX. <_D3bug4callFDFZiZv>: ... mov 0x8(%ebp),%eax // loads context ptr mov -0x4(%ebp),%ebx // correctly loads GOT into EBX mov 0xc(%ebp),%edx // loads function ptr mov 0x8(%ebp),%ebx // overwrites EBX with context ptr ??? call *%edx The interface thunk call through call *%edx needs a correct EBX. <_TMP3>: sub $0x8,%eax jmp d3e0 <_D3bug1C6opCallMFZi at plt> So the problematic instruction is the additional load into EBX. This works correctly with optimized builds btw. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 15:30:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 22:30:47 +0000 (UTC) Subject: [Issue 10462] interface thunk doesn't preserve EBX In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10462 --- Comment #7 from Martin Nowak 2013-07-19 15:30:46 PDT --- https://github.com/D-Programming-Language/dmd/pull/2367 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 16:31:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 23:31:38 +0000 (UTC) Subject: [Issue 9673] Add --incremental option to rdmd In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9673 --- Comment #10 from Martin Nowak 2013-07-19 16:31:36 PDT --- Kind of works, but there are not many independent clusters in phobos. https://gist.github.com/dawgfoto/5747405 A better approach might be to optimize for even cluster sizes, e.g. trying to split 100KLOC into 4 independent clusters of 25KLOC. The number of lines here are sources+imports. Assignment of source files to clusters could then be optimized with simulated annealing or so. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 16:40:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 23:40:12 +0000 (UTC) Subject: [Issue 9922] Improve symbol emitting for templates for better separate compilation support In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9922 --- Comment #3 from Martin Nowak 2013-07-19 16:40:11 PDT --- We had another Bugzilla for link errors with separate compilation but I can't find it. There I mentioned that the correct compiler behavior would be to emit a weak template instance to each object file that references that instance. This has some performance issues but it only affects separate compilation with multiple object files. One approach to mitigate the performance impact would be something like partial linking, i.e. producing the duplicated template instances at binary level not at AST level. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 16:51:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 23:51:17 +0000 (UTC) Subject: [Issue 10462] interface thunk doesn't preserve EBX In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10462 --- Comment #8 from github-bugzilla at puremagic.com 2013-07-19 16:51:16 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e3510d1b801808934ba074b357546960b0bc180e fix Issue 10462 - call through function pointer might trash EBX add EBX to the keepmsk after GOT was loaded https://github.com/D-Programming-Language/dmd/commit/d4d0c61c510ed60b2601945a4252f6f6239594ca Merge pull request #2367 from dawgfoto/fix10462 fix Issue 10462 - call through function pointer might trash EBX -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 16:51:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 23:51:57 +0000 (UTC) Subject: [Issue 10462] interface thunk doesn't preserve EBX In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10462 --- Comment #9 from github-bugzilla at puremagic.com 2013-07-19 16:51:56 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/109c41f5ff2f814982d02ce0932c95249934618d Merge pull request #2367 from dawgfoto/fix10462 fix Issue 10462 - call through function pointer might trash EBX -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 16:52:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 23:52:47 +0000 (UTC) Subject: [Issue 10462] interface thunk doesn't preserve EBX In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10462 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Version|D2 |D1 & D2 Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 16:54:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 19 Jul 2013 23:54:48 +0000 (UTC) Subject: [Issue 10639] Win64: wrong optimizer codegen with struct literal with complex fields In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10639 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 17:50:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 00:50:20 +0000 (UTC) Subject: [Issue 9922] Improve symbol emitting for templates for better separate compilation support In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9922 --- Comment #4 from Dicebot 2013-07-19 17:50:18 PDT --- (In reply to comment #3) > There I mentioned that the correct compiler behavior would be to emit a weak > template instance to each object file that references that instance. > This has some performance issues but it only affects separate compilation with > multiple object files. Yes, that is my understanding too. However, implementing this may be much trickier than it sounds because currently DMD front-end does not really track object files that need to reference instance in any convenient fashion. At least I could not find a straightforward way. Another issue is that template instances are re-used and only context of first usage gets fully saved (again, that is what trial-and-error have shown to me). We have discussed that briefly in matching (failed) pull request by eskimor. However, I expect in the end performance to actually improve because those few extra weak symbols per module object file are minority comparing to all templates that get used only by constraints and CTFE and can be completely ignored during symbol emitting. If compiler becomes more aware of actual template usage (from ABI point of view), some useful optimizations can be done here. Are you referring to this "won't fix" issue http://d.puremagic.com/issues/show_bug.cgi?id=3274 ? Anyway, I am trying to hack together some proper solution here, to address both separate compilation and template bloat issues, but it is likely to take hell of a long time, dmd code in this part is far from obvious. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 18:58:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 01:58:40 +0000 (UTC) Subject: [Issue 10676] New: excessive compilation times with optimized PIC build Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10676 Summary: excessive compilation times with optimized PIC build Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: blocker Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: code at dawg.eu --- Comment #0 from Martin Nowak 2013-07-19 18:58:39 PDT --- ../dmd/src/dmd -I../druntime/import -c -unittest -m32 std/algorithm.d 3.9s ../dmd/src/dmd -I../druntime/import -c -unittest -m32 -O std/algorithm.d 5.8s ../dmd/src/dmd -I../druntime/import -c -unittest -m32 -fPIC std/algorithm.d 4.0s ../dmd/src/dmd -I../druntime/import -c -unittest -m32 -O -fPIC std/algorithm.d 1.5min Profiling showed that over 90% of the time is spent in list_append (called by listrds) during constant propagation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 20:38:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 03:38:39 +0000 (UTC) Subject: [Issue 10674] getopt does not work for enum type In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10674 --- Comment #2 from Tomoya Tanjo 2013-07-19 20:38:36 PDT --- Thank you for your comment. After fixing args, I confirmed it works as expected. BTW, > The problem is that args[0] is expected to be the program name, is it described in the document? I did not find it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 19 23:23:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 06:23:00 +0000 (UTC) Subject: [Issue 10644] Win64: wrong code when passing arguments through ... In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10644 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-19 23:22:59 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e16b2c81e55b0d1622c40cf3970a3f458dd2c2b8 fix Issue 10644 - Win64: wrong code when passing arguments through ... https://github.com/D-Programming-Language/phobos/commit/1bd22b2e8b1a9bf5fb7c71d2490015d601925c28 Merge pull request #1423 from WalterBright/fix10644 fix Issue 10644 - Win64: wrong code when passing arguments through ... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 00:57:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 07:57:24 +0000 (UTC) Subject: [Issue 10677] New: Win64: cfloat return value not forwarded correctly as function argument Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10677 Summary: Win64: cfloat return value not forwarded correctly as function argument Product: D Version: D1 & D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-20 00:57:23 PDT --- Another one from the phobos unittests that I hoped was covered by other reports: /////////////////////////////// void formatTest2(cfloat s, double re, double im) { assert(s.re == re); assert(s.im == im); } cfloat getcf() { return 2 + 1i; } unittest { formatTest2( getcf(), 2, 1 ); } void main() {} ////////////////////////////// compile with "dmd -m64 -unittest test.d" to trigger the assertion. Here's the disassembly: _D4test5getcfFZq: 0000000000000000: 55 push rbp 0000000000000001: 48 8B EC mov rbp,rsp 0000000000000004: 48 83 EC 10 sub rsp,10h 0000000000000008: D9 05 00 00 00 00 fld dword ptr [_TMP0] 000000000000000E: D9 05 04 00 00 00 fld dword ptr [_TMP0+4] 0000000000000014: D9 5D F0 fstp dword ptr [rbp-10h] 0000000000000017: F3 0F 10 4D F0 movss xmm1,dword ptr [rbp-10h] 000000000000001C: D9 5D F0 fstp dword ptr [rbp-10h] 000000000000001F: F3 0F 10 45 F0 movss xmm0,dword ptr [rbp-10h] 0000000000000024: 48 8D 65 00 lea rsp,[rbp] 0000000000000028: 5D pop rbp 0000000000000029: C3 ret _D4test15__unittestL13_1FZv: 0000000000000000: 55 push rbp 0000000000000001: 48 8B EC mov rbp,rsp 0000000000000004: 48 83 EC 10 sub rsp,10h 0000000000000008: 48 83 EC 20 sub rsp,20h 000000000000000C: E8 00 00 00 00 call _D4test5getcfFZq 0000000000000011: 48 83 C4 20 add rsp,20h 0000000000000015: 49 89 C0 mov r8,rax 0000000000000018: F2 48 0F 10 0D 00 movsd xmm1,mmword ptr [_TMP1] 00 00 00 0000000000000021: 48 B8 00 00 00 00 mov rax,3FF0000000000000h 00 00 F0 3F 000000000000002B: 48 89 45 F0 mov qword ptr [rbp-10h],rax 000000000000002F: F2 0F 10 45 F0 movsd xmm0,mmword ptr [rbp-10h] 0000000000000034: 48 83 EC 20 sub rsp,20h 0000000000000038: 66 48 0F 7E CA movd rdx,xmm1 000000000000003D: 66 48 0F 7E C1 movd rcx,xmm0 0000000000000042: E8 00 00 00 00 call _D4test11formatTest2FqddZv 0000000000000047: 48 83 C4 20 add rsp,20h 000000000000004B: 48 8D 65 00 lea rsp,[rbp] 000000000000004F: 5D pop rbp 0000000000000050: C3 ret getcf returns the result in xmm0 and xmm1, but it is expected in rax by the caller. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 02:02:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 09:02:51 +0000 (UTC) Subject: [Issue 10678] New: Win64: wrong code passing small fixed sized array as function argument Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10678 Summary: Win64: wrong code passing small fixed sized array as function argument Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: r.sagitario at gmx.de --- Comment #0 from Rainer Schuetze 2013-07-20 02:02:45 PDT --- extracted from std.format unittests: //////////////////////////////////// enum size = 5; char[size] ret() { char[size] hello = "hello world"[0..size]; return hello; } void test(char[size] txt) { assert(txt == "hello world"[0..size]); // fails } void main() { auto r = ret(); assert(r == "hello world"[0..size]); // passes test(r); } ///////////////////////////////////// compile with "dmd -m64 test.d" to trigger the assertion. This happens for array sizes 5, 6 and 7. This might be related to issue 9586. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 03:37:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 10:37:43 +0000 (UTC) Subject: [Issue 10679] New: Stack traces generated are inaccurate Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10679 Summary: Stack traces generated are inaccurate Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: yazan.dabain at gmail.com --- Comment #0 from yazan.dabain at gmail.com 2013-07-20 03:37:42 PDT --- Linux 64bit, code compiled with -g flag void main() { //line 1 auto a = 0; //line 2 func(); //line 3 } //line 4 void func() { //line 6 throw new Exception("Test"); //line 7 } //line 8 Stack generated and addresses provided are checked using addr2line, the address pointing to func (line 3) is pointing to line 2 instead. Even when moving func above the declaration of a, the address points to the declaration of a. (i.e. points to line 3 in the following example) void main() { //line 1 func(); //line 2 auto a = 0; //line 3 } //line 4 void func() { //line 6 throw new Exception("Test"); //line 7 } //line 8 There are two possible points where this bug might come from: 1) druntime/core/runtime lines (399 to 425) where the backtrace is generated. (BTW, why are backtrace glibc calls only producing the last address in DMD?). 2) The dwarf debug info produced by dmd are not correct. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 04:06:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 11:06:00 +0000 (UTC) Subject: [Issue 4179] Deleting items from an associative array iterated over In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4179 --- Comment #9 from bearophile_hugs at eml.cc 2013-07-20 04:05:58 PDT --- (In reply to comment #8) > There are more possible ways to make it safe than this. > > One way is to have a list of current iterations associated with each AA. Any > time an item is removed, any current iterations are also updated. The nodes of > the list can be stored on the stack of aaApply or whatever function does the > "foreach" for AAs. It can be as simple as one pointer in the AA structure, and > a structure with two fields ("current iteration item" / "next list node") on > the stack - this should allow everything to "just work" and have a small impact > on performance. > > Alternatively, when items are removed from an AA they can be left for the GC to > collect rather than deleted explicitly, and their "next" pointer can be set to > a magic value indicating that they were deleted (e.g. cast(void*)1). My suggestion was for the foreach to set a boolean flag inside the associative array, and reset it when the foreach ends. Then the AA.delete should look for this flag and throw an exception if it's set. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 05:05:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 12:05:19 +0000 (UTC) Subject: [Issue 6372] data loss due to possible bug in garbage collector In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6372 Rainer Schuetze changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagitario at gmx.de --- Comment #1 from Rainer Schuetze 2013-07-20 05:05:11 PDT --- https://github.com/D-Programming-Language/druntime/pull/547 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 05:45:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 12:45:10 +0000 (UTC) Subject: [Issue 10669] CTFE: using initialized static const class member no longer works In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10669 --- Comment #1 from Rainer Schuetze 2013-07-20 05:45:08 PDT --- https://github.com/D-Programming-Language/dmd/pull/2369 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 06:57:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 13:57:17 +0000 (UTC) Subject: [Issue 6372] data loss due to possible bug in garbage collector In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6372 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED --- Comment #2 from yebblies 2013-07-20 23:57:14 EST --- https://github.com/D-Programming-Language/druntime/commit/883d699b7c6fabcc89aae77ae62955eebd9b0372 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 07:58:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 14:58:36 +0000 (UTC) Subject: [Issue 10680] New: BigInt uses deprecated std.traits.unsigned Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10680 Summary: BigInt uses deprecated std.traits.unsigned Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 07:58:34 PDT --- I think unsigned() is a trait, so it should be in std.traits. But in the meantime there is this small problem: import std.bigint: BigInt; void main() { BigInt(1); } DMD 2.064alpha gives: ...\dmd2\src\phobos\std\bigint.d(534): Deprecation: alias std.traits.unsigned is deprecated - unsigned has been moved to std.conv. Please adjust your imports accordingly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 09:58:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 16:58:51 +0000 (UTC) Subject: [Issue 10593] array's reserve/capacity go haywire if length has been changed prior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10593 Martin Nowak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code at dawg.eu --- Comment #3 from Martin Nowak 2013-07-20 09:58:49 PDT --- It seems that reserve doesn't update the capacity. If bug 6372 is not the reason for this you might want to look at the array blockinfo cache. reduced test case --- cat > bug.d << CODE void main() { enum M = 4079; ubyte[] a = new ubyte[](M - 1); a ~= 1; immutable u = a.reserve(M+1); assert(u == a.capacity); } CODE dmd -run bug --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 10:50:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 17:50:36 +0000 (UTC) Subject: [Issue 10681] New: [ICE](arrayop.c line 525) with array multiplication Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10681 Summary: [ICE](arrayop.c line 525) with array multiplication Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 10:50:35 PDT --- void main() { auto a = [1]; a[] *= a[0]; } DMD 2.064alpha gives: Assertion failure: '0' on line 525 in file 'arrayop.c' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 11:03:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 18:03:22 +0000 (UTC) Subject: [Issue 10681] [ICE](arrayop.c line 525) with array multiplication In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10681 Nils changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |nilsbossung at googlemail.com Resolution| |DUPLICATE --- Comment #1 from Nils 2013-07-20 11:03:21 PDT --- *** This issue has been marked as a duplicate of issue 10626 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 11:03:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 18:03:23 +0000 (UTC) Subject: [Issue 10626] ICE with vector operation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10626 Nils changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #3 from Nils 2013-07-20 11:03:21 PDT --- *** Issue 10681 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: ------- From d-bugmail at puremagic.com Sat Jul 20 11:06:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 18:06:07 +0000 (UTC) Subject: [Issue 10682] New: [ICE](cgcod.c line 1561) with ^^ operator Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10682 Summary: [ICE](cgcod.c line 1561) with ^^ operator Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 11:06:06 PDT --- void main() { ulong x = 1; ulong y = 2 ^^ x; } DMD 2.064alpha gives: Internal error: backend\cgcod.c 1561 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 11:38:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 18:38:03 +0000 (UTC) Subject: [Issue 10683] New: std.range.join of an array of array of tuple of string Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10683 Summary: std.range.join of an array of array of tuple of string Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 11:38:02 PDT --- import std.typecons: tuple; import std.range: join; void main() { auto r1 = [[tuple(1)]].join; // OK auto r2 = [[tuple("x")]].join; // Error } DMD 2.064alpha gives: core.exception.AssertError at std.algorithm(1923): Assertion failure I think this used to work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 11:42:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 18:42:19 +0000 (UTC) Subject: [Issue 10644] Win64: wrong code when passing arguments through ... In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10644 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 11:58:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 18:58:04 +0000 (UTC) Subject: [Issue 10680] BigInt uses deprecated std.traits.unsigned In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10680 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg at gmx.com --- Comment #1 from Jonathan M Davis 2013-07-20 11:58:03 PDT --- Traits are eponymous templates which tell you a trait of a type or symbol - i.e. give you some kind of information about it. unsigned does nothing of the sort. It's a function which casts to the unsigned version of an integral type. It's a conversion function and as such makes perfect sense in std.conv. It was discussed when the pull for that was made, and the decision was made to move it into std.conv, because it fits better there. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 11:58:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 18:58:30 +0000 (UTC) Subject: [Issue 10680] BigInt uses deprecated std.traits.unsigned In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10680 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Jonathan M Davis 2013-07-20 11:58:29 PDT --- https://github.com/D-Programming-Language/phobos/pull/1427 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 12:15:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 19:15:39 +0000 (UTC) Subject: [Issue 10680] BigInt uses deprecated std.traits.unsigned In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10680 --- Comment #3 from bearophile_hugs at eml.cc 2013-07-20 12:15:37 PDT --- (In reply to comment #1) > Traits are eponymous templates which tell you a trait of a type or symbol - > i.e. give you some kind of information about it. unsigned does nothing of the > sort. It's a function which casts to the unsigned version of an integral type. > It's a conversion function and as such makes perfect sense in std.conv. It was > discussed when the pull for that was made, and the decision was made to move it > into std.conv, because it fits better there. Right, thank you. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 12:20:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 19:20:54 +0000 (UTC) Subject: [Issue 8966] ICE(cgcod.c) when passing cfloat argument with indirection In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8966 --- Comment #3 from Walter Bright 2013-07-20 12:20:53 PDT --- Correct test case: https://github.com/D-Programming-Language/dmd/pull/2370 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 12:47:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 19:47:15 +0000 (UTC) Subject: [Issue 10684] New: Refused array op with array literal Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10684 Summary: Refused array op with array literal Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 12:47:14 PDT --- void main() { int[] a = [0, 0]; a[] += [10, 20][]; } DMD 2.064alpha gives: test.d(3): Error: invalid array operation a[] += [10, 20] (did you forget a [] ?) I think this used to work. Maybe related to Issue 10626 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 12:58:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 19:58:55 +0000 (UTC) Subject: [Issue 8966] ICE(cgcod.c) when passing cfloat argument with indirection In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8966 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #4 from bearophile_hugs at eml.cc 2013-07-20 12:58:54 PDT --- But cfloats are deprecated. Isn't it _much_ better to focus the development/debugging efforts on features that are not deprecated? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 13:54:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 20:54:48 +0000 (UTC) Subject: [Issue 6804] shared File doesn't compile In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6804 John Colvin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |john.loughran.colvin at gmail. | |com --- Comment #1 from John Colvin 2013-07-20 21:54:46 BST --- Just ran in to this. Is there any sensible way to be able to create a shared File object? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 13:56:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 20:56:55 +0000 (UTC) Subject: [Issue 10685] New: Immutable interval foreach to propagate index value range Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10685 Summary: Immutable interval foreach to propagate index value range Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 13:56:55 PDT --- Foreach on a defined interval with an immutable index is a very common operation: void main() { foreach (immutable i; 0 .. 10) char c = 'x' + i; } DMD 2.064alpha gives: test.d(3): Error: cannot implicitly convert expression (120 + i) of type int to char I suggest to give (propagate) the immutable variable 'i' the range [0, 10] so the assignment to c requires no cast. Se also Issue 10018 , Issue 10615 , Issue 10594 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 13:58:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 20:58:04 +0000 (UTC) Subject: [Issue 10018] Value range propagation for immutable variables In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10018 --- Comment #6 from bearophile_hugs at eml.cc 2013-07-20 13:58:03 PDT --- Se also Issue 10685 , Issue 10615 , Issue 10594 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 14:22:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 21:22:10 +0000 (UTC) Subject: [Issue 10685] Immutable interval foreach to propagate index value range In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10685 --- Comment #1 from bearophile_hugs at eml.cc 2013-07-20 14:22:09 PDT --- This range propagation is also useful for array bounds. See this code: void main() { int[100] a; foreach (immutable i; 0 .. 10) a[i] = 1; } Compiled with DMD gives: _D4test7__arrayZ: L0: enter 4,0 push EAX mov ECX,offset FLAT:_D4test12__ModuleInfoZ push ECX call near ptr __d_array_bounds __Dmain: L0: enter 0198h,0 push EBX push ESI push EDI mov ECX,064h xor EAX,EAX lea EDI,-0198h[EBP] rep stosd mov -8[EBP],EAX L19: cmp dword ptr -8[EBP],0Ah jge L4B mov ECX,-8[EBP] mov -4[EBP],ECX mov EDX,-4[EBP] cmp EDX,064h jb L37 mov EAX,4 call near ptr _D4test7__arrayZ L37: mov EBX,1 mov ESI,-4[EBP] mov -0198h[ESI*4][EBP],EBX inc dword ptr -8[EBP] jmp short L19 L4B: xor EAX,EAX pop EDI pop ESI pop EBX leave ret If the range of 'i' is propagated dmd could generate code like, thanks to Issue 9097 already implemented: __Dmain: enter 0198h,0 push EBX push EDI mov ECX,064h xor EAX,EAX lea EDI,-0198h[EBP] rep stosd mov -8[EBP],EAX L18: cmp dword ptr -8[EBP],0Ah jge L38 mov ECX,-8[EBP] mov -4[EBP],ECX mov EDX,1 mov EBX,-4[EBP] mov -0198h[EBX*4][EBP],EDX inc dword ptr -8[EBP] jmp short L18 L38: xor EAX,EAX pop EDI pop EBX leave ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 15:27:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 22:27:46 +0000 (UTC) Subject: [Issue 10686] New: No [] operator overload for immutable Tuple Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10686 Summary: No [] operator overload for immutable Tuple Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: regression Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 15:27:45 PDT --- import std.typecons: Tuple; void main() { immutable Tuple!(int) t1; auto r1 = t1[0]; // OK immutable Tuple!(int, "x") t2; auto r2 = t2[0]; // error } DMD 2.064alpha gives: test.d(6): Error: no [] operator overload for type immutable(Tuple!(int, "x")) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 16:14:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 20 Jul 2013 23:14:49 +0000 (UTC) Subject: [Issue 10687] New: Refused cast from uint[] to array of uint-based enums at compile-time Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10687 Summary: Refused cast from uint[] to array of uint-based enums at compile-time Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-20 16:14:49 PDT --- I think this used to be accepted: enum Foo : uint { A, B, C, D, E } void main() { static immutable uint[5] a1 = [0, 1, 2, 3, 4]; // line 3 auto a2 = cast(immutable(Foo[5]))a1; // OK static a3 = cast(immutable(Foo[5]))a1; // line 5, error } test.d(3): Error: cannot implicitly convert expression ([0u, 1u, 2u, 3u, 4u]) of type immutable(uint[5u]) to immutable(Foo[5u]) Also the error line number is wrong, the right line number is 5. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 17:20:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 00:20:10 +0000 (UTC) Subject: [Issue 10669] CTFE: using initialized static const class member no longer works In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10669 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-20 17:20:09 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5d18ef6b202976d8f14beb9752be741e7959e314 Merge pull request #2369 from rainers/issue10669 fix Issue 10669 - CTFE: using initialized static const class member no longer works -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 17:20:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 00:20:31 +0000 (UTC) Subject: [Issue 10669] CTFE: using initialized static const class member no longer works In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10669 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 17:24:02 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 00:24:02 +0000 (UTC) Subject: [Issue 10583] DMD 2.063 dumps core with mixins involving __traits(getProtection, .. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10583 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-20 17:23:59 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8437f1993cd1924e423cddcda45d83fdb41f0a96 fix Issue 10583 - DMD 2.063 dumps core with mixins involving __traits(getProtection) https://github.com/D-Programming-Language/dmd/commit/671b7c20b96b580ee1dc2b3f5e3ee66c63d079b6 Merge pull request #2362 from 9rnsr/fix10583 Issue 10583 - DMD 2.063 dumps core with mixins involving __traits(getProtection) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 17:24:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 00:24:04 +0000 (UTC) Subject: [Issue 10628] [REG2.063] spurious "hidden by" deprecation warning In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10628 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-20 17:24:03 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8f916c8ac61ddd1d2bab5f241509e0555e409a14 fix Issue 10628 - spurious "hidden by" deprecation warning -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 17:24:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 00:24:27 +0000 (UTC) Subject: [Issue 10583] DMD 2.063 dumps core with mixins involving __traits(getProtection, .. In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10583 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 20:29:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 03:29:19 +0000 (UTC) Subject: [Issue 8966] ICE(cgcod.c) when passing cfloat argument with indirection In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8966 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-20 20:29:14 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/dc1ca1e958f8b093be3b09dc749254adc6079728 Merge pull request #2370 from WalterBright/test8966 add missing test case for Issue 8966 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 21:11:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 04:11:33 +0000 (UTC) Subject: [Issue 10677] Win64: cfloat return value not forwarded correctly as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10677 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-20 21:11:32 PDT --- https://github.com/D-Programming-Language/dmd/pull/2371 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 21:59:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 04:59:01 +0000 (UTC) Subject: [Issue 4749] Templated & non-templated constructors conflicting In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4749 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jmdavisProg at gmx.com Resolution| |DUPLICATE --- Comment #5 from Jonathan M Davis 2013-07-20 21:58:59 PDT --- *** This issue has been marked as a duplicate of issue 1528 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 20 21:59:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 04:59:07 +0000 (UTC) Subject: [Issue 1528] [tdpl] overloading template and non-template functions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1528 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mitch.hayenga at gmail.com --- Comment #39 from Jonathan M Davis 2013-07-20 21:58:59 PDT --- *** Issue 4749 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: ------- From d-bugmail at puremagic.com Sun Jul 21 00:34:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 07:34:23 +0000 (UTC) Subject: [Issue 10593] array's reserve/capacity go haywire if length has been changed prior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10593 Rainer Schuetze changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagitario at gmx.de --- Comment #4 from Rainer Schuetze 2013-07-21 00:34:21 PDT --- There is an update missing to the blkinfo cache in the array extending: https://github.com/D-Programming-Language/druntime/pull/548 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 00:45:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 07:45:28 +0000 (UTC) Subject: [Issue 10593] array's reserve/capacity go haywire if length has been changed prior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10593 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-21 00:45:27 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/4f0e73f1fdcd8c8c3898089f3ae1707f77ff857d Merge pull request #548 from rainers/fix10593 fix Issue 10593 - array's reserve/capacity go haywire if length has been changed prior -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 02:18:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 09:18:32 +0000 (UTC) Subject: [Issue 10688] New: Misleading error message when attempting a "private override" Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10688 Summary: Misleading error message when attempting a "private override" Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: Marco.Leise at gmx.de --- Comment #0 from Marco Leise 2013-07-21 02:18:29 PDT --- class Bar: Foo { private: override void func() {} } This doesn't compile and print "cannot override a non-virtual function". It took me a while to realize that the problem (in a larger class) was not in the base class, but in the attributes of the override. What about error messages like: "cannot reduce visibility of override" or "overrides must not be private" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 04:59:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 11:59:49 +0000 (UTC) Subject: [Issue 10628] [REG2.063] spurious "hidden by" deprecation warning In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10628 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 05:26:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 12:26:08 +0000 (UTC) Subject: [Issue 10686] No [] operator overload for immutable Tuple In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10686 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Platform|x86 |All OS/Version|Windows |All --- Comment #1 from Kenji Hara 2013-07-21 05:26:06 PDT --- https://github.com/D-Programming-Language/phobos/pull/1428 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 05:40:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 12:40:14 +0000 (UTC) Subject: [Issue 10680] BigInt uses deprecated std.traits.unsigned In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10680 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-21 05:40:12 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/668087adb71c51637371967ee43a066cfdfafc83 Fix for issue# 10680. unsigned was moved to std.conv (with a deprecated alias left in std.traits), but std.bigint was not updated accordingly. This fixes that. https://github.com/D-Programming-Language/phobos/commit/4e9063b9599f206667224f6baf705b0644bb1701 Merge pull request #1427 from jmdavis/10680 Fix for issue# 10680. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 05:44:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 12:44:54 +0000 (UTC) Subject: [Issue 10660] ddoc on std.algorithm: Cheat sheet description for 'filter' is wrong In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10660 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-21 05:44:53 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e9e43e09ed2cc98f88f7492782b694ffb1823cad Merge pull request #1422 from quickfur/filter_docs Fix issue 10660. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 06:56:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 13:56:49 +0000 (UTC) Subject: [Issue 10680] BigInt uses deprecated std.traits.unsigned In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10680 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 06:59:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 13:59:01 +0000 (UTC) Subject: [Issue 10660] ddoc on std.algorithm: Cheat sheet description for 'filter' is wrong In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10660 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 07:40:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 14:40:49 +0000 (UTC) Subject: [Issue 10689] New: Cannot overtly call a templated constructor in a non-templated struct Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10689 Summary: Cannot overtly call a templated constructor in a non-templated struct Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: sturtivant at gmail.com --- Comment #0 from Carl Sturtivant 2013-07-21 07:40:48 PDT --- Created an attachment (id=1237) Small example that illustrates the problem Consider a constructor call of the form A a = A!3(99); where A is a struct that is not a template but has a constructor that is a template, such as this( int k)(int n) { ... } Such a constructor call is not recognized as such, instead the compiler complains that the struct A is not a template. ---confirmed on Windows and Ubuntu amd64. See http://forum.dlang.org/thread/aojudrgdecxqxvljaynx at forum.dlang.org#post-adyxvouppnoqktbkgzue:40forum.dlang.org for discussion thereof. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 09:15:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 16:15:12 +0000 (UTC) Subject: [Issue 10690] New: Assertion failure in swap caused by array() of a filter() of tuples of string Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10690 Summary: Assertion failure in swap caused by array() of a filter() of tuples of string Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-21 09:15:11 PDT --- import std.algorithm: filter; import std.array: array; import std.typecons: tuple; void main() { [tuple(1)].filter!(t => true).array; // No error [tuple("A")].filter!(t => true).array; // error } DMD 2.064alpha gives me: core.exception.AssertError at std.algorithm(1923): Assertion failure -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 10:27:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 17:27:46 +0000 (UTC) Subject: [Issue 10691] New: real type on Win 64 broken (?) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10691 Summary: real type on Win 64 broken (?) Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: pr at m1xa.com --- Comment #0 from Michael 2013-07-21 10:27:45 PDT --- import std.stdio; void main() { writeln(real.min_normal, " ", real.max); } Produces every time different output: 1 run - 8.9527e-313 8.9527e-313 2 run - 1.21008e-312 1.21008e-312 3 run - 3.56e-312 3.56e-312 ... Or not recognized by ms linker? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 11:36:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 18:36:59 +0000 (UTC) Subject: [Issue 10551] [CTFE] Wrong-code on passing dereferenced array pointer by ref 2 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10551 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-21 11:36:58 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d9a769ed0cbec4065306349077381e3e021498f3 Fix issue 10551 CTFE array pointer passed by ref IndexExp needs to consider the case where we need a reference https://github.com/D-Programming-Language/dmd/commit/97c624f73bc3b76cff8ae9f21c4dba2767f87cd6 Merge pull request #2324 from donc/ctfe10551_derefpointer Fix issue 10551 CTFE array pointer passed by ref -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 11:38:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 18:38:17 +0000 (UTC) Subject: [Issue 10452] CTFE: Cannot compare delegates with == or 'is' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10452 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-21 11:38:16 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/48385f97a2604c87fed590a1b091c387183a5167 Fix issue 10452 cannot compare delegates in CTFE Support == and 'is' for delegates. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 11:38:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 18:38:36 +0000 (UTC) Subject: [Issue 10452] CTFE: Cannot compare delegates with == or 'is' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10452 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 13:15:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 20:15:51 +0000 (UTC) Subject: [Issue 9546] getProtection trait does not work with mixin or getMember In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9546 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-21 13:15:50 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ad28224b3c5240f466c8e3b384a55b07742a4a90 fix Issue 9546 - getProtection trait does not work with mixin or getMember Stop access check during `__traits(getProtection)` evaluated. https://github.com/D-Programming-Language/dmd/commit/2ead3f00168ce9b99e1c845e631b3603bcccb905 Merge pull request #2361 from 9rnsr/fix9546 Issue 9546 - getProtection trait does not work with mixin or getMember -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 13:16:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 20:16:04 +0000 (UTC) Subject: [Issue 9546] getProtection trait does not work with mixin or getMember In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9546 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 14:02:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 21:02:37 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-21 14:02:34 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/acd073afcb89d639c8c99cd7f8233788db6036d6 fix Issue 10567 - Typeinfo.compare has unreasonable signature requirements on opCmp If needed, generate `__xopEquals` method in order to adapt `opCmp` member function (even if it's template) to the function pointer `TypeInfo_Struct.xopCmp`. https://github.com/D-Programming-Language/dmd/commit/19988b6d9d854f68e3984f871f0e8977a7be1f09 Merge pull request #2321 from 9rnsr/fix10567 Partial fix for Issue 10567 - Typeinfo.compare has unreasonable signature requirements on opCmp -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 15:00:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 22:00:12 +0000 (UTC) Subject: [Issue 10327] Missing 'package.d' for DIP37 needs a better error message In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10327 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-21 15:00:11 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0d30f12f2b9f0b4fe71938b02065a752ebe6fb63 Fixes Issue 10327 - More informative error message on missing package.d file. https://github.com/D-Programming-Language/dmd/commit/477e42a03576d758c8902afb495525d84c0a1d1e Merge pull request #2159 from AndrejMitrovic/Fix10327 Issue 10327 - More informative error message on missing package.d file -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 15:00:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 21 Jul 2013 22:00:20 +0000 (UTC) Subject: [Issue 10327] Missing 'package.d' for DIP37 needs a better error message In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10327 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 19:16:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 02:16:05 +0000 (UTC) Subject: [Issue 10692] New: Deprecation isn't checked using alias this Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10692 Summary: Deprecation isn't checked using alias this Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: Jesse.K.Phillips+D at gmail.com --- Comment #0 from Jesse Phillips 2013-07-21 19:16:04 PDT --- I would expect accessing members of B to fail when accessed with alias this: struct B { int i; } struct A { B b; deprecated alias b this; } void main() { A a; a.i = 5; // Deprecated assert(a.i == 5); // Deprecated } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 21:50:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 04:50:46 +0000 (UTC) Subject: [Issue 10693] New: cartesianProduct with over 7 ranges causes segfault at compile time Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10693 Summary: cartesianProduct with over 7 ranges causes segfault at compile time Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: ttanjo at gmail.com --- Comment #0 from Tomoya Tanjo 2013-07-21 21:50:45 PDT --- The following code causes segfault at compile time on dmd v2.064-devel-477e42a on Linux 64bit. -- // foo.d import std.algorithm; void main(string[] args) { int[] a, b, c, d, e, f, g; foreach(_; cartesianProduct(a, b, c, d, e, f, g)) { } } -- Output: $ dmd foo.d segmentation fault: 11 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 21:54:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 04:54:19 +0000 (UTC) Subject: [Issue 10693] cartesianProduct with over 7 ranges causes segfault at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10693 --- Comment #1 from Tomoya Tanjo 2013-07-21 21:54:18 PDT --- Oh sorry, it causes on Mac OS X 64bit, not Linux 64bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 22:10:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 05:10:33 +0000 (UTC) Subject: [Issue 10693] cartesianProduct with over 7 ranges causes segfault at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10693 --- Comment #2 from Tomoya Tanjo 2013-07-21 22:10:33 PDT --- When I use cartesianProduct with 6 ranges, it compiles without errors but its compiling takes too long time (about 5 minutes in my system). -- $ time dmd foo.d dmd foo.d 302.94s user 2.27s system 99% cpu 5:05.71 total -- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 23:36:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 06:36:47 +0000 (UTC) Subject: [Issue 10677] Win64: cfloat return value not forwarded correctly as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10677 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-21 23:36:46 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/dcebbd99140bcec147522be779cdc00af8fc70ff fix Issue 10677 - Win64: cfloat return value not forwarded correctly as function argument https://github.com/D-Programming-Language/dmd/commit/bbcd96872ea1afe719adf97675985517217837fa Merge pull request #2371 from WalterBright/fix10677 fix Issue 10677 - Win64: cfloat return value not forwarded correctly as ... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 23:54:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 06:54:07 +0000 (UTC) Subject: [Issue 10690] Assertion failure in swap caused by array() of a filter() of tuples of string In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10690 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #1 from monarchdodra at gmail.com 2013-07-21 23:54:05 PDT --- (In reply to comment #0) > import std.algorithm: filter; > import std.array: array; > import std.typecons: tuple; > void main() { > [tuple(1)].filter!(t => true).array; // No error > [tuple("A")].filter!(t => true).array; // error > } > > > DMD 2.064alpha gives me: > > core.exception.AssertError at std.algorithm(1923): Assertion failure This looks like a combination of: http://d.puremagic.com/issues/show_bug.cgi?id=9824 Basically, emplace is calling opAssign over a garbage struct. This leads to undefined bahavior, since the implementation of Tupple's opAssign assume the current Tuple to be in a known state (to use the "swap-and-destroy" strategy) And bug http://d.puremagic.com/issues/show_bug.cgi?id=9975 Where, arguably, swap has no business making that assertion. This should spontaneously resolve itself once either of these two bugs are fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 21 23:55:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 06:55:16 +0000 (UTC) Subject: [Issue 10593] array's reserve/capacity go haywire if length has been changed prior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10593 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 00:36:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 07:36:58 +0000 (UTC) Subject: [Issue 10677] Win64: cfloat return value not forwarded correctly as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10677 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 01:40:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 08:40:48 +0000 (UTC) Subject: [Issue 2643] Front-end should check for unimplemented interface functions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=2643 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Summary|-o- switch breaks semantic |Front-end should check for |analysis |unimplemented interface | |functions --- Comment #6 from Don 2013-07-22 01:40:46 PDT --- This is not just an issue with -o-. Because the error is only generated in the glue layer, it isn't prevented from being sent to CTFE. This means that in some circumstances, in CTFE, you can successfully call a function which the compiler says does not exist!! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 02:32:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 09:32:47 +0000 (UTC) Subject: [Issue 10694] New: wrong purity check for static variables with impure destructor Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10694 Summary: wrong purity check for static variables with impure destructor Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-22 02:32:44 PDT --- //---- import std.stdio; struct Foo { ~this() { writeln("destroyed"); } } void bar() pure { static Foo i; //(13) } void main() { bar(); } //---- main.d(13): Error: pure function 'main.bar' cannot access mutable static data 'i' main.d(13): Error: pure function 'main.bar' cannot call impure function 'main.Foo.~this' //---- Because i is static, its destructor should never be called, so bar should not be concerned that i's destructor is not pure. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 03:21:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 10:21:59 +0000 (UTC) Subject: [Issue 10670] std.algorithm.reduce: no-seed initialization wrong design In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10670 --- Comment #3 from monarchdodra at gmail.com 2013-07-22 03:21:52 PDT --- I've done the dev. Here is my preliminary experience with it: For starters, there *is* some convenience in using "front as seed" for calls such as: //---- double[] a = [ 3, 4, 7, 11, 3, 2, 5 ]; // Compute minimum and maximum in one pass auto r = reduce!(min, max)(a); //---- Here, even a straight up "0.0" is a bad seed. The code needs to be fixed as: //---- double[] a = [ 3, 4, 7, 11, 3, 2, 5 ]; // Compute minimum and maximum in one pass auto r = reduce!(min, max)(tuple(double.max, double.min), a); //---- Not very convenient. But still, nothing surmountable. But at the same time, if you look at the existing unittests, you can see some strange things such as: //---- // two funs auto r2 = reduce!("a + b", "a - b")(tuple(0.0, 0.0), a); writeln(r2); assert(r2[0] == 7 && r2[1] == -7); auto r3 = reduce!("a + b", "a - b")(a); assert(r3[0] == 7 && r3[1] == -1); //---- I don't know what that was trying to prove, but it shows that no-seed can do some really strange things. The "assert not float (or char for that matter)" was very efficient in catching float seeds, and catched almost all of the "wrong usage" cases. The only one that it did not catch was the above case. But such code doesn't make sense to me. I think "silent breakage" would really be minimal. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 03:53:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 10:53:49 +0000 (UTC) Subject: [Issue 10695] New: __MODULE__ in string mixin crashes compiler Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10695 Summary: __MODULE__ in string mixin crashes compiler Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: johannespfau at gmail.com --- Comment #0 from Johannes Pfau 2013-07-22 03:53:49 PDT --- Test case: -------------------- module a; void main() { //string mod = __MODULE__; // <--This is working mixin("string mod = __MODULE__;"); } -------------------- Tested with dmd 2.063.2 and 2.064 git. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 04:55:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 11:55:08 +0000 (UTC) Subject: [Issue 10670] std.algorithm.reduce: no-seed initialization wrong design In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10670 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #4 from bearophile_hugs at eml.cc 2013-07-22 04:55:04 PDT --- (In reply to comment #2) > In the case of floats, well... I'd argue that using the seedless variety of > reduce on a float range is already a bug, I don't think it's a bug, this is Python: >>> a = [2.0, 3.0, 4.0] >>> reduce(lambda x, y: x * y, a) 24.0 I have a ton of D code that relies on such behavour of D reduce. I suggest to just swap the seed and sequence arguments of reduce, to support UFCS chains, and leave the rest of reduce as it is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 04:56:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 11:56:44 +0000 (UTC) Subject: [Issue 10690] Assertion failure in swap caused by array() of a filter() of tuples of string In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10690 --- Comment #2 from bearophile_hugs at eml.cc 2013-07-22 04:56:43 PDT --- (In reply to comment #1) > This should spontaneously resolve itself once either of these two bugs are > fixed. OK. In the meantime this regression is breaking a good amount of my code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 06:11:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 13:11:03 +0000 (UTC) Subject: [Issue 10695] __MODULE__ in string mixin crashes compiler In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10695 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Andrej Mitrovic 2013-07-22 06:11:02 PDT --- https://github.com/D-Programming-Language/dmd/pull/2372 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 06:12:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 13:12:00 +0000 (UTC) Subject: [Issue 10695] __MODULE__ in string mixin crashes compiler In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10695 --- Comment #2 from Andrej Mitrovic 2013-07-22 06:11:59 PDT --- P.S. you may also run into Issue 10339, that one has a pull as well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 08:32:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 15:32:08 +0000 (UTC) Subject: [Issue 9599] File.byLine doesn't function properly with take In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9599 Nick Treleaven changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |ntrel-public at yahoo.co.uk --- Comment #4 from Nick Treleaven 2013-07-22 08:32:06 PDT --- (In reply to comment #1) > The bug is actually inside byLine itself, so we can remove take from the > equation. The problem is that byLine is over-eager: > 1) Creating a front element eagerly pops that element. > 2) poping an element eagerlly parses the next, effectivelly popping it off too > if it is never read: https://github.com/D-Programming-Language/phobos/pull/1433 > auto file = File.tmpfile(); > file.write("1\n2\n3\n4\n5"); > file.rewind(); > > auto fbl1 = file.byLine(); > writeln(fbl1.front); //prints 1. > > auto fbl2 = file.byLine(); > writeln(fbl2.front); //prints 2... Wait. Who popped off 1? I think the above behaviour is understandable for a range like ByLine. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 10:26:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 17:26:15 +0000 (UTC) Subject: [Issue 10696] New: Show array bounds in Range violation exception messages Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10696 Summary: Show array bounds in Range violation exception messages Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-22 10:26:14 PDT --- void main(string[] args) { auto a = new int[5]; auto x = a[args.length + 10]; } DMD 2.064alpha gives me at runtime: core.exception.RangeError at test(3): Range violation But I'd like an error like: core.exception.RangeError at test(3): Range violation with index '11' outside the [0 .. 5] bounds If it's not convenient to write that, then a simpler error message can be: core.exception.RangeError at test(3): Range violation with index '11' Such printed range values are very useful during debugging. If possible I'd like such error messages to show signed values before they get converted to a size_t, to make the messages more easy to read: void main() { auto a = new int[5]; int i = -10; auto x = a[i]; } ===> core.exception.RangeError at test(3): Range violation with index '-10' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 10:35:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 17:35:53 +0000 (UTC) Subject: [Issue 10697] New: Syntactically Incorrect Alias This Causes Object to Conflict with Itself Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10697 Summary: Syntactically Incorrect Alias This Causes Object to Conflict with Itself Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monkeyworks12 at hotmail.com --- Comment #0 from monkeyworks12 at hotmail.com 2013-07-22 10:35:52 PDT --- import std.stdio; struct Test1 { int i; } struct Test2 { Test1 test1; alias this test1; } void main() { Test2 test2; writeln(test2.i); } /d995/f66.d(11): Error: alias f66.Test2.test1 conflicts with variable f66.Test2.test1 at /d995/f66.d(10) This also fails on GDC 2.060 and LDC 2.060, and whatever version of git HEAD dpaste is using. http://dpaste.dzfl.pl/5f8bb3f4 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 10:45:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 17:45:41 +0000 (UTC) Subject: [Issue 10698] New: opDispatch called even when it requires runtime arguments Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10698 Summary: opDispatch called even when it requires runtime arguments Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: monkeyworks12 at hotmail.com --- Comment #0 from monkeyworks12 at hotmail.com 2013-07-22 10:45:41 PDT --- import std.stdio; struct Test1 { int i; } struct Test2 { Test1 test1; alias test1 this; int opDispatch(string id)(string dummy) { return 42; } } void main() { Test2 test2; writeln(test2.i); } /d663/f665.d(22): Error: function f665.Test2.opDispatch!("i").opDispatch (string dummy) is not callable using argument types () Fails on DMD 2.063, GDC 2.060, LDC 2.060, and git HEAD. http://dpaste.dzfl.pl/c3a50642 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 11:51:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 18:51:04 +0000 (UTC) Subject: [Issue 10677] Win64: cfloat return value not forwarded correctly as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10677 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-22 11:51:00 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f70a40257e73fcd6e37e7208776b29e1e5d2f6aa Merge pull request #2371 from WalterBright/fix10677 fix Issue 10677 - Win64: cfloat return value not forwarded correctly as ... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 14:59:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 22 Jul 2013 21:59:15 +0000 (UTC) Subject: [Issue 10694] wrong purity check for static variables with impure destructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10694 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-22 14:59:13 PDT --- https://github.com/D-Programming-Language/dmd/pull/2373 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 17:34:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 00:34:36 +0000 (UTC) Subject: [Issue 9967] ParameterIdentifierTuple broken for setters In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9967 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-22 17:34:34 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/735d0e33c852fe691108c02241ba0129283f17cf Fixes issue #9967 - ParameterIdentifierTuple broken for setters https://github.com/D-Programming-Language/phobos/commit/8c2f4c512fe7518acd92b78dace4141e9d618702 Merge pull request #1378 from yazd/fix9967 Fix for issue #9967 - ParameterIdentifierTuple broken for setters -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 17:36:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 00:36:12 +0000 (UTC) Subject: [Issue 9967] ParameterIdentifierTuple broken for setters In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9967 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Status|NEW |RESOLVED Component|DMD |Phobos Version|unspecified |D2 Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 17:38:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 00:38:15 +0000 (UTC) Subject: [Issue 10695] __MODULE__ in string mixin crashes compiler In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10695 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-22 17:38:14 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/48788c36b8726b50af2c2da8ff8d916e957056ac Fixes Issue 10695 - ICE when using __MODULE__ within mixin string. https://github.com/D-Programming-Language/dmd/commit/3f7c3297bba6d75c2d1e49850656e66484d7b82a Merge pull request #2372 from AndrejMitrovic/Fix10695 Issue 10695 - ICE when using __MODULE__ within a mixin string. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 17:38:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 00:38:40 +0000 (UTC) Subject: [Issue 10695] __MODULE__ in string mixin crashes compiler In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10695 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 17:44:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 00:44:30 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 --- Comment #10 from github-bugzilla at puremagic.com 2013-07-22 17:44:28 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/70d4c03fe295dfdd320488b3e5435ede3b55640b Fix issues 8435, 10118. https://github.com/D-Programming-Language/phobos/commit/fc12f98267b6506117d88a79fd51945d2db4c6b8 Merge pull request #1402 from quickfur/bigint_hash Fix issues 8435, 10118. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 17:44:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 00:44:34 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-22 17:44:33 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/70d4c03fe295dfdd320488b3e5435ede3b55640b Fix issues 8435, 10118. https://github.com/D-Programming-Language/phobos/commit/fc12f98267b6506117d88a79fd51945d2db4c6b8 Merge pull request #1402 from quickfur/bigint_hash Fix issues 8435, 10118. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 18:33:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 01:33:23 +0000 (UTC) Subject: [Issue 10699] New: override inconsistently allowed for abstract functions Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10699 Summary: override inconsistently allowed for abstract functions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-22 18:33:22 PDT --- ----- interface IC { abstract void foo(); abstract void bar(); } class AC : IC { override void foo() { } } class CC : AC { override void bar() { } } ----- $ Error: function test.CC.bar does not override any function, did you mean to override 'test.IC.bar'? If we're allowed to use 'override' for implementing abstract methods in AC, why is it not allowed in CC? Also related: http://d.puremagic.com/issues/show_bug.cgi?id=9978 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 18:35:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 01:35:11 +0000 (UTC) Subject: [Issue 10699] override inconsistently allowed for abstract functions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10699 --- Comment #1 from Andrej Mitrovic 2013-07-22 18:35:10 PDT --- I want these to work because it makes it clearer from reading the class that these methods can be called with a reference to a base class (and in fact the base class can call such a method itself). Disallowing 'override' in this case makes the code less clear. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 18:50:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 01:50:26 +0000 (UTC) Subject: [Issue 8435] BigInts don't work well in associative arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8435 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 18:51:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 01:51:08 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE | --- Comment #6 from hsteoh at quickfur.ath.cx 2013-07-22 18:51:06 PDT --- Issue #8435 has been fixed in git HEAD, but apparently the code in this bug is still failing, so reopening. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 19:00:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 02:00:45 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 --- Comment #7 from hsteoh at quickfur.ath.cx 2013-07-22 19:00:45 PDT --- Apparently, DMD commit acd073afcb89d639c8c99cd7f8233788db6036d6 broke the fix for this bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 22:59:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 05:59:41 +0000 (UTC) Subject: [Issue 10670] std.algorithm.reduce: no-seed initialization wrong design In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10670 --- Comment #5 from monarchdodra at gmail.com 2013-07-22 22:59:37 PDT --- (In reply to comment #4) > (In reply to comment #2) > > > In the case of floats, well... I'd argue that using the seedless variety of > > reduce on a float range is already a bug, > > I don't think it's a bug, this is Python: > > >>> a = [2.0, 3.0, 4.0] > >>> reduce(lambda x, y: x * y, a) > 24.0 > > I have a ton of D code that relies on such behavour of D reduce. You could be right, and I've seen use cases where it makes a lot of sense, eg: reduce!`a ~ " " ~ b`(["hello", "world"]); > I suggest to just swap the seed and sequence arguments of reduce, to support > UFCS chains, and leave the rest of reduce as it is. I've tried in http://d.puremagic.com/issues/show_bug.cgi?id=8755, but the conclusion is that it is not possible without breaking code. And when I say "breaking code", I mean "still compiles but silently generates different results". That, and no migration plan was found. Short of finding a new name for a new function, I have not been able to achieve this goad. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 23:03:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 06:03:19 +0000 (UTC) Subject: [Issue 10690] Assertion failure in swap caused by array() of a filter() of tuples of string In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10690 --- Comment #3 from monarchdodra at gmail.com 2013-07-22 23:03:18 PDT --- (In reply to comment #2) > (In reply to comment #1) > > > This should spontaneously resolve itself once either of these two bugs are > > fixed. > > OK. In the meantime this regression is breaking a good amount of my code. I was curious about what happened, since these are old outstanding bugs. The regression itself was introduced by the correct "swap and destroy" introduced in tuple here: https://github.com/D-Programming-Language/phobos/commit/d8c6187d6e94ed794382e4b21b7876085cb523b2#std/typecons.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 23:25:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 06:25:18 +0000 (UTC) Subject: [Issue 10670] std.algorithm.reduce: no-seed initialization wrong design In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10670 --- Comment #6 from bearophile_hugs at eml.cc 2013-07-22 23:25:14 PDT --- (In reply to comment #5) > I've tried in http://d.puremagic.com/issues/show_bug.cgi?id=8755, but the > conclusion is that it is not possible without breaking code. And when I say > "breaking code", I mean "still compiles but silently generates different > results". That, and no migration plan was found. Short of finding a new name > for a new function, I have not been able to achieve this goad. I understand. I suggest to introduce a new function named like your "fold" and slowly deprecate "reduce". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 22 23:59:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 06:59:59 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #7 from Kenji Hara 2013-07-22 23:59:56 PDT --- https://github.com/D-Programming-Language/dmd/pull/2374 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 00:01:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 07:01:29 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 --- Comment #8 from Kenji Hara 2013-07-23 00:01:28 PDT --- (In reply to comment #7) > Apparently, DMD commit acd073afcb89d639c8c99cd7f8233788db6036d6 broke the fix > for this bug. I opened additional compiler change to fix BigInt issue: https://github.com/D-Programming-Language/dmd/pull/2374 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 00:49:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 07:49:22 +0000 (UTC) Subject: [Issue 10700] New: Add __traits(isOverride) to get if a function is override Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10700 Summary: Add __traits(isOverride) to get if a function is override Product: D Version: future Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: doob at me.com --- Comment #0 from Jacob Carlborg 2013-07-23 00:49:21 PDT --- Add __traits(isOverride) to get if a function is override -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 00:50:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 07:50:56 +0000 (UTC) Subject: [Issue 10700] Add __traits(isOverride) to get if a function is override In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10700 --- Comment #1 from Jacob Carlborg 2013-07-23 00:50:55 PDT --- Pull request: https://github.com/D-Programming-Language/dmd/pull/2366#issuecomment-21316103 Documentation needs to be added for this as well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 01:10:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 08:10:32 +0000 (UTC) Subject: [Issue 10700] Add __traits(isOverrideFunction) to get if a function is override In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10700 Jacob Carlborg changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add __traits(isOverride) to |Add |get if a function is |__traits(isOverrideFunction |override |) to get if a function is | |override --- Comment #2 from Jacob Carlborg 2013-07-23 01:10:31 PDT --- It's actual __traits(__isOverrideFunction). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 01:21:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 08:21:06 +0000 (UTC) Subject: [Issue 10701] New: segfault after GC.realloc Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10701 Summary: segfault after GC.realloc Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-23 01:21:05 PDT --- Created an attachment (id=1238) segfault after realloc Only reproduced on 64 bit posix systems. This is kind of complicated. The reduced program needs to iterate a couple of times (probably to corrupt the GC?) a few times before the problem will trigger. The good news, is that the segfault deterministically repeats itselft, so the debug "should" be easy to do. It would *appear* that the core culprit is creating a dynamic array (or size larger than 4080), and then calling realloc on "array.ptr". Now, I'm not 100% sure this is legal to begin with, since "array.ptr" is actually offset by 16 bytes from the start of the memory block. Is that actually undefined behavior, or does it just reduce the chances of the program working? I'd simply leave it at that and move on, but there is something that bothers me deeply: //---- ubyte[] arr = new ubyte[](5000); GC.realloc(arr.ptr, 0, GC.BlkAttr.NO_SCAN); //---- This works 100% fine (AFAIK, never segfaulted), but this: //---- ubyte[] arr; arr.length = 5000; GC.realloc(arr.ptr, 0, GC.BlkAttr.NO_SCAN); //---- Doing this ends up segfaulting later down the line. *** Why is the behavior different? *** I believe it is worth trying to investigate this at least a little, we might be able to unravel a bug somewhere inside the code... The code is in the attachment. I've reduced it as much as I could. If somebody with more skills (and is more used to debugging in a *nix environment) could take a peak? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 01:48:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 08:48:49 +0000 (UTC) Subject: [Issue 10702] New: Undefined identifier '_xopCmp' Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10702 Summary: Undefined identifier '_xopCmp' Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: verylonglogin.reg at gmail.com --- Comment #0 from Denis Shelomovskij 2013-07-23 12:48:47 MSD --- Merging pull request #2321 leads to this message on previously working codebase: --- Error: undefined identifier '_xopCmp' Assertion failure: 's' on line 691 in file 'clone.c' --- Is the issue fixable with this information or should I provide minimal or full source testcase? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 02:05:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 09:05:58 +0000 (UTC) Subject: [Issue 10700] Add __traits(isOverrideFunction) to get if a function is override In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10700 --- Comment #3 from Jacob Carlborg 2013-07-23 02:05:52 PDT --- Pull request for the documentation: https://github.com/D-Programming-Language/dlang.org/pull/366. This also includes the documentation for the getUnitTests trait. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 02:26:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 09:26:21 +0000 (UTC) Subject: [Issue 879] support for --gc-sections In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=879 Trass3r changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 CC| |mrmocool at gmx.de Platform|x86 |All Version|1.00 |D1 & D2 Severity|enhancement |normal --- Comment #6 from Trass3r 2013-07-23 11:26:15 CEST --- --gc-sections breaks everything, even hello world. import std.stdio; void main() { writefln("FIXME!"); } $ dmd -L--gc-sections -L--print-gc-sections test.d ld: Removing unused section '.deh_eh' in file 'test.o' ld: Removing unused section '.minfo' in file 'test.o' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__34_85a.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__54_915.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__5a_ff3.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__5e_8d3.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__60_fb1.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__62_882.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__63_f60.o)' ld: Removing unused section '.data' in file 'libphobos2.a(dmain2_44e_47b.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(dmain2_44e_47b.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_455_482.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_462_7db.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_467_46f.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_475_60d.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_478_6c8.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_47b_4cd.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_47c_53b.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_480_2a1.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(sections_linux.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__4db_e8d.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(console.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(container.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__551_86e.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(array.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(conv.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(exception.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(exception_599_8af.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(format.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(functional.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(math.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(range.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(stdio.o)' ld: Removing unused section '.data' in file 'libphobos2.a(stdio_c2b_180.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(stdio_c2b_180.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(stdiobase.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(string.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(traits.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(typecons.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(typetuple.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(utf.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(object__6_32e.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(object__1b_3a8.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__57_ef0.o)' ld: Removing unused section '.data' in file 'libphobos2.a(runtime_e3_76e.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(runtime_e3_76e.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_12d_5a0.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(gc.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(gcx_2f3_8a.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(deh2.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__434_e4b.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(dmain2.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(lifetime.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_459_856.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(lifetime_459_856.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_45e_4a3.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_461_4e2.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_463_4df.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_464_548.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_471_4c9.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(lifetime_471_4c9.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(monitor_.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(tlsgc.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(algorithm.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(ascii.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(bitmanip.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(container.o)' ld: Removing unused section '.data' in file 'libphobos2.a(exception_5c8_d27.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(exception_5c8_d27.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(random.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(regex.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(uni.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(uni_tab.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object_.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(exception.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__d9_929.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(runtime.o)' ld: Removing unused section '.data' in file 'libphobos2.a(runtime_e2_2e4.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(thread.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_109_236.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_10b_1b0.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_10e_330.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_10e_330.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_110_3bd.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_117_2e5.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_117_2e5.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_118_1b8.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_120_21c.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_124_28e.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_124_28e.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_126_48b.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_128_6e4.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_128_6e4.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_130_6f2.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_131_291.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_132_681.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_132_681.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_136_595.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_13a_85e.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_13e_762.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_13f_465.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_144_236.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_14e_1b8.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(time.o)' ld: Removing unused section '.data' in file 'libphobos2.a(time_177_5cc.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(mutex_225_213.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(gcx.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__343_b3c.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(critical_.o)' ld: Removing unused section '.data' in file 'libphobos2.a(dmain2_448_2f9.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(dmain2_448_2f9.o)' ld: Removing unused section '.data' in file 'libphobos2.a(dmain2_44a_2fd.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(dmain2_44a_2fd.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_46f_815.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_470_809.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(numeric.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object_891_87d.o)' ld: Removing unused section '.data' in file 'libphobos2.a(demangle_b8_ab6.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(demangle_b8_ab6.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_105_897.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_106_826.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_107_1b8.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_108_1b8.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_10a_22e.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_10a_22e.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_113_219.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_115_2d8.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_121_129.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_121_129.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_123_129.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_123_129.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_12e_726.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_12f_302.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_134_737.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_135_5f2.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_135_5f2.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_13b_469.o)' ld: Removing unused section '.data' in file 'libphobos2.a(time_16b_346.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(time_16b_346.o)' ld: Removing unused section '.data' in file 'libphobos2.a(time_178_297.o)' ld: Removing unused section '.data' in file 'libphobos2.a(time_17e_48a.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(time_17e_48a.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(aaA.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__340_aeb.o)' ld: Removing unused section '.data' in file 'libphobos2.a(lifetime_474_7cc.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(complex.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(demangle_b4_31d.o)' ld: Removing unused section '.data' in file 'libphobos2.a(demangle_b9_81f.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(demangle_b9_81f.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_104_713.o)' ld: Removing unused section '.deh_eh' in file 'libphobos2.a(thread_104_713.o)' ld: Removing unused section '.data' in file 'libphobos2.a(thread_119_155.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__341_c78.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__344_c36.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__345_be5.o)' ld: Removing unused section '.minfo' in file 'libphobos2.a(object__33f_b6c.o)' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 02:28:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 09:28:16 +0000 (UTC) Subject: [Issue 879] support for --gc-sections In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=879 --- Comment #7 from Trass3r 2013-07-23 11:28:14 CEST --- As far as I remember the flag works fine with gdc. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 03:56:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 10:56:54 +0000 (UTC) Subject: [Issue 10701] segfault after GC.realloc In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10701 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim at maxim-fomin.ru --- Comment #1 from Maxim Fomin 2013-07-23 03:56:52 PDT --- Reduced: import core.memory, std.array; extern(C) int printf(const char*, ...); void readt() { //ubyte[] result = new ubyte[](5000); //This works ubyte[] result; result.length = 5000; //But this fails GC.free(result.ptr); result = null; } string toStr(long src) { auto w = appender!string(); return ""; } void main() { foreach(int i; 0 .. 256) { printf("Step: %d\n", i); string corruptme = "./temp"; foreach(e; 0 .. 256) { corruptme ~= toStr(1); } readt(); } } Removing appender makes bug go away. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 04:32:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 11:32:09 +0000 (UTC) Subject: [Issue 10702] Undefined identifier '_xopCmp' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10702 --- Comment #1 from Kenji Hara 2013-07-23 04:32:07 PDT --- dmd/pull/2321 requires druntime change druntime/pull/543, so you need to update your local druntime repo. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 05:05:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 12:05:09 +0000 (UTC) Subject: [Issue 10701] segfault after GC.realloc In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10701 --- Comment #2 from monarchdodra at gmail.com 2013-07-23 05:04:48 PDT --- (In reply to comment #1) > Reduced: > [...] > Removing appender makes bug go away. Nice. Appender in itself isn't doing anything much. As long as an allocation occurs, any function will do: //---- string toStr(long src) { new int; return ""; } //---- EG: //---- import core.memory; extern(C) int printf(const char*, ...); void readt() { //ubyte[] result = new ubyte[](5000); //This works ubyte[] result; result.length = 5000; //But this fails GC.free(result.ptr); result = null; } string toStr(long src) { new int; return ""; } void main() { foreach(int i; 0 .. 1024) { printf("Step: %d\n", i); string corruptme = "./temp"; foreach(e; 0 .. 256) { corruptme ~= toStr(1); } readt(); } } //---- This still preserves the "This works/But this fails" issue. Cores on iteration 255 (adding more "new int" will divide that number by the amount of "new") -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 06:07:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 13:07:36 +0000 (UTC) Subject: [Issue 10701] segfault in GC In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10701 Maxim Fomin changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|segfault after GC.realloc |segfault in GC Severity|normal |critical --- Comment #3 from Maxim Fomin 2013-07-23 06:07:35 PDT --- (In reply to comment #2) > (In reply to comment #1) > > Reduced: > > [...] > > Removing appender makes bug go away. > > Nice. > > Appender in itself isn't doing anything much. As long as an allocation occurs, > any function will do: > > //---- > string toStr(long src) > { > new int; > return ""; > } > //---- Then futher reduced: import core.memory; extern(C) int printf(const char*, ...); void readt() { //ubyte[] result = new ubyte[](5000); //This works ubyte[] result; result.length = 5000; //But this fails GC.free(result.ptr); //works if commented out result = null; } void main() { foreach(i; 0 .. 1024) { foreach(e; 0 .. 1024) { new int; } readt(); } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 07:28:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 14:28:23 +0000 (UTC) Subject: [Issue 10703] New: Front-end code removal "optimisation" with try/catch blocks produces wrong codegen Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10703 Summary: Front-end code removal "optimisation" with try/catch blocks produces wrong codegen Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: ibuclaw at ubuntu.com --- Comment #0 from Iain Buclaw 2013-07-23 07:28:21 PDT --- Simple example that compiles with dmd but runtime segfaults at the location of 'goto'. This is also uncompilable with gdc, and would cause an ICE if not for working around the problem as per https://github.com/D-Programming-Language/dmd/pull/2176. void main() { int a; goto L2; // BOOM! try { } catch (Exception e) { L2: ; a += 100; } assert(a == 100); } The most obvious wrong thing about code like this is that it skips over the initialisation of 'e', which is a direct violation of the spec for GotoStatements. But if the code is actively removed from the front-end, that makes checking this violation impossible in lower layers of the code generation routines. So we need to be able to achieve this in the front-end. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 07:32:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 14:32:06 +0000 (UTC) Subject: [Issue 10703] Front-end code removal "optimisation" with try/catch blocks produces wrong codegen In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10703 --- Comment #1 from Iain Buclaw 2013-07-23 07:32:05 PDT --- (In reply to comment #0) > > void main() > { > int a; > goto L2; // BOOM! > > try { } > catch (Exception e) { > L2: ; > a += 100; > } > assert(a == 100); > } > For clarification, the front-end currently passes this to the back-end. void main() { int a; goto L2; // BOOM! assert(a == 100); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 09:21:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 16:21:44 +0000 (UTC) Subject: [Issue 10704] New: Cannot pass arguments by ref with std.concurrency.spawn Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10704 Summary: Cannot pass arguments by ref with std.concurrency.spawn Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: john.loughran.colvin at gmail.com --- Comment #0 from John Colvin 2013-07-23 17:21:43 BST --- It can be useful to pass ref arguments when spawning a new thread (with appropriate care of course), but spawn currently doesn't allow that. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 09:21:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 16:21:58 +0000 (UTC) Subject: [Issue 10704] Cannot pass arguments by ref with std.concurrency.spawn In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10704 John Colvin changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 11:11:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 18:11:14 +0000 (UTC) Subject: [Issue 10705] New: recursive alias declaration Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10705 Summary: recursive alias declaration Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: rswhite4 at googlemail.com --- Comment #0 from rswhite4 at googlemail.com 2013-07-23 11:11:12 PDT --- ---- import std.stdio; struct Rect(T) { public: bool intersects(ref const Rect!T rhs, ShortRect* overlap = null) { return false; } } alias FloatRect = Rect!float; alias ShortRect = Rect!short; void main() { } ---- print: tpl_bug.d(11): Error: alias tpl_bug.ShortRect recursive alias declaration tpl_bug.d(11): Error: template instance tpl_bug.Rect!(short) error instantiating tpl_bug.d(10): Error: template instance tpl_bug.Rect!(float) error instantiating dmd 2.063.2, Windows Seems the Compiler is a bit confused. If I change 'ShortRect' to 'Rect!short' or 'Rect!T' everything works fine. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 13:00:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 20:00:27 +0000 (UTC) Subject: [Issue 10706] New: Functions that require a sorted range to take a SortedRange? Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10706 Summary: Functions that require a sorted range to take a SortedRange? Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-23 13:00:25 PDT --- In Phobos we have std.range.assumeSorted, std.algorithm.isSorted, and various sort() functions that return a SortedRange. If you call a release() on a SortedRange you get the range that's under it (often an array). (A SortedRange was so far only a RandomAccessRange, but lately the it has emerged the idea that a ForwardRange is OK too, so it will probably be expanded for all input ranges.) So isn't it good to have the "set operations" (that actually work on _sorted bags_, so their name is in my opinion misleading) of std.algorithm, like std.algorithm.setDifference accept only SortedRanges? SetDifference!(less, SortedRange1, SortedRange2) setDifference(alias less = "a < b", R1, R2)(SortedRange1 r1, SortedRange2 r2); The disadvantage is that such functions become a bit more fussy, so you can't give them normal arrays. The advantage is that if you have to keep around sorted data, you can perform on it all kinds of elaborations available only with sorted data and the type system will catch you mistakes like using unsorted data where sorted is required. The functions in discussion are: largestPartialIntersection largestPartialIntersectionWeighted NWayUnion SetDifference SetIntersection SetSymmetricDifference SetUnion -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 13:41:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 20:41:35 +0000 (UTC) Subject: [Issue 10707] New: Add to std.complex some optional high level SIMD code Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10707 Summary: Add to std.complex some optional high level SIMD code Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-23 13:41:33 PDT --- This simple D benchmark shows a complex number multiplication done with std.complex, using double2 and SIMD instructions, and the same wrapped in a struct: import std.stdio, core.simd, ldc.gccbuiltins_x86, std.complex; alias ComplexD = Complex!double; ComplexD mult1(in ComplexD x, in ComplexD y) { return x * y; } double2 mult2(double2 a, double2 b) { double2 b_flip = [b.array[1], b.array[0]]; // Swap b.re and b.im double2 a_im = [a.array[1], a.array[1]]; // Imag. part of a in both double2 a_re = [a.array[0], a.array[0]]; // Real part of a in both double2 aib = a_im * b_flip; // (a.im*b.im, a.im*b.re) double2 arb = a_re * b; // (a.re*b.re, a.re*b.im) return __builtin_ia32_addsubpd(arb, aib); // subtract/add } struct ComplexS { union { double2 x; struct { double re, im; } } alias x this; } ComplexS mult3(ComplexS a, ComplexS b) { double2 b_flip = [b.im, b.re]; double2 a_im = [a.im, a.im]; double2 a_re = [a.re, a.re]; double2 aib = a_im * b_flip; double2 arb = a_re * b; return ComplexS(__builtin_ia32_addsubpd(arb, aib)); } void main() { const c1 = ComplexD(1.0, 30.0); const c2 = ComplexD(500.0, 7000.0); mult1(c1, c2).writeln; double2 x1 = [1.0, 30.0]; double2 x2 = [500.0, 7000.0]; mult2(x1, x2).array.writeln; auto x1s = ComplexS([1.0, 30.0]); auto x2s = ComplexS([500.0, 7000.0]); mult3(x1s, x2s).array.writeln; } If I compile the code with a compiler designed for floating point performance (ldc2 v. 0.11.0 based on DMD v2.062 and LLVM 3.3svn) with: ldmd2 -O -release -inline -noboundscheck -mattr=sse3 -output-s test_complex.d I get the 32bit x86 with SS3 asm: __D12test_complex5mult1FxS3std7complex14__T7ComplexTdZ7ComplexxS3std7complex14__T7ComplexTdZ7ComplexZS3std7complex14__T7ComplexTdZ7Complex: movsd 20(%esp), %xmm0 movsd 28(%esp), %xmm3 movsd 4(%esp), %xmm1 movsd 12(%esp), %xmm2 movaps %xmm2, %xmm4 mulsd %xmm3, %xmm4 movaps %xmm1, %xmm5 mulsd %xmm0, %xmm5 subsd %xmm4, %xmm5 movsd %xmm5, (%eax) mulsd %xmm3, %xmm1 mulsd %xmm0, %xmm2 addsd %xmm1, %xmm2 movsd %xmm2, 8(%eax) ret $32 __D12test_complex5mult2FNhG2dNhG2dZNhG2d: pshufd $238, %xmm1, %xmm3 pshufd $78, %xmm0, %xmm2 mulpd %xmm3, %xmm2 pshufd $68, %xmm1, %xmm1 mulpd %xmm0, %xmm1 addsubpd %xmm2, %xmm1 movapd %xmm1, %xmm0 ret __D12test_complex5mult3FS12test_complex8ComplexSS12test_complex8ComplexSZS12test_complex8ComplexS: pushl %ebp movl %esp, %ebp andl $-16, %esp subl $16, %esp movsd 16(%ebp), %xmm1 movhpd 8(%ebp), %xmm1 movddup 32(%ebp), %xmm0 mulpd %xmm1, %xmm0 movddup 24(%ebp), %xmm1 mulpd 8(%ebp), %xmm1 addsubpd %xmm0, %xmm1 movupd %xmm1, (%eax) movl %ebp, %esp popl %ebp ret $32 Notes: - mult2 is quite more efficient than mult1. - Maybe there is a way to remove one asm instruction from mult2, the last movapd, if the precedent instruction addsubpd is done on %xmm2 and %xmm0 and other instruction registers are swapped. - Maybe the struct ComplexS is badly designed. For that code I have used the SS3 SIMD extension, that today is very common for all kind of Intel compatible CPUs. Using the AVX2 ldc2 produces: __D12test_complex5mult1FxS3std7complex14__T7ComplexTdZ7ComplexxS3std7complex14__T7ComplexTdZ7ComplexZS3std7complex14__T7ComplexTdZ7Complex: vmovsd 20(%esp), %xmm0 vmovsd 28(%esp), %xmm1 vmovsd 4(%esp), %xmm2 vmovsd 12(%esp), %xmm3 vmulsd %xmm1, %xmm3, %xmm4 vmulsd %xmm0, %xmm2, %xmm5 vsubsd %xmm4, %xmm5, %xmm4 vmovsd %xmm4, (%eax) vmulsd %xmm1, %xmm2, %xmm1 vmulsd %xmm0, %xmm3, %xmm0 vaddsd %xmm1, %xmm0, %xmm0 vmovsd %xmm0, 8(%eax) ret $32 __D12test_complex5mult2FNhG2dNhG2dZNhG2d: vpermilpd $3, %xmm1, %xmm2 vpermilpd $1, %xmm0, %xmm3 vmulpd %xmm2, %xmm3, %xmm2 vpbroadcastq %xmm1, %xmm1 vmulpd %xmm0, %xmm1, %xmm0 vaddsubpd %xmm2, %xmm0, %xmm0 ret If I add -vectorize-slp -vectorize-slp-aggressive to the compilation switches the asm of mult1 gets a bit better: __D12test_complex5mult1FxS3std7complex14__T7ComplexTdZ7ComplexxS3std7complex14__T7ComplexTdZ7ComplexZS3std7complex14__T7ComplexTdZ7Complex: vmovsd 20(%esp), %xmm0 vmovsd 28(%esp), %xmm1 vmovsd 4(%esp), %xmm2 vmovsd 12(%esp), %xmm3 vmulsd %xmm1, %xmm2, %xmm4 vmulsd %xmm0, %xmm3, %xmm5 vaddsd %xmm4, %xmm5, %xmm4 vmulsd %xmm1, %xmm3, %xmm1 vmulsd %xmm0, %xmm2, %xmm0 vsubsd %xmm1, %xmm0, %xmm0 vunpcklpd %xmm4, %xmm0, %xmm0 vmovupd %xmm0, (%eax) ret $32 So I suggest to add to std.complex some high level SIMD code like mult2, that gets compiled if the target CPU supports SS3 instructions. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 14:05:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 21:05:48 +0000 (UTC) Subject: [Issue 10700] Add __traits(isOverrideFunction) to get if a function is override In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10700 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #4 from Walter Bright 2013-07-23 14:05:47 PDT --- Pull request has been pulled: https://github.com/D-Programming-Language/dmd/pull/2366 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 15:47:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 23 Jul 2013 22:47:40 +0000 (UTC) Subject: [Issue 10672] struct initializer treated as lambda literal In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10672 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-23 15:47:39 PDT --- I'm unable to reproduce it. Which platform are you on? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 17:22:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 00:22:50 +0000 (UTC) Subject: [Issue 10672] struct initializer treated as lambda literal In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10672 Infiltrator changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lt.infiltrator at gmail.com --- Comment #2 from Infiltrator 2013-07-23 17:22:48 PDT --- I can reproduce on http://dpaste.dzfl.pl/ only with D1; not with D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 18:39:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 01:39:53 +0000 (UTC) Subject: [Issue 9828] Inconsistent lowering of 1-element tuple to its element In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9828 --- Comment #2 from Kenji Hara 2013-07-23 18:39:52 PDT --- (In reply to comment #0) > alias tuple!("foo") Foo; > alias d = get!Foo; // works, ?? Here's no inconsistency. If you give a tuple as template argument, it would be automatically expanded to its elements. And if the tuple contains just one symbol element, the template argument would match to alias version. > if (d == "foo") { } // works > if (Foo == "foo") { } // does not work OTOH, currently one-element tuple is not automatically expanded to the element itself on the each side of binary operator. I'm not sure this is well designed, but I think that holding the distinction of them would be valuable than mixing them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 21:21:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 04:21:09 +0000 (UTC) Subject: [Issue 10676] excessive compilation times with optimized PIC build In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10676 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com Version|D2 |D1 & D2 --- Comment #1 from Walter Bright 2013-07-23 21:21:08 PDT --- https://github.com/D-Programming-Language/dmd/pull/2375 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 23:47:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 06:47:36 +0000 (UTC) Subject: [Issue 10676] excessive compilation times with optimized PIC build In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10676 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-23 23:47:31 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2e86cf1102c144a7d2efc1e720ab7476916a4e17 fix Issue 10676 - excessive compilation times with optimized PIC build https://github.com/D-Programming-Language/dmd/commit/c2ae114f110e5663d35b0ba4fc09c808993c383f Merge pull request #2375 from WalterBright/fix10676 fix Issue 10676 - excessive compilation times with optimized PIC build -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 23:50:43 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 06:50:43 +0000 (UTC) Subject: [Issue 10676] excessive compilation times with optimized PIC build In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10676 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies at gmail.com --- Comment #3 from yebblies 2013-07-24 16:50:42 EST --- How about now? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 23:56:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 06:56:34 +0000 (UTC) Subject: [Issue 10708] New: Class members as template alias parameters not CTFE-able Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10708 Summary: Class members as template alias parameters not CTFE-able Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: johannespfau at gmail.com --- Comment #0 from Johannes Pfau 2013-07-23 23:56:33 PDT --- Test case: ------------------------ class TestClass { int a; this() { enum c = getAttribute!(TestClass.a); } } int getAttribute(alias target)() { return 0; } ------------------------ produces this error in DMD 2.063: Error: value of 'this' is not known at compile time This is annoying as you can use e.g. __traits(getAttributes, TestClass.a) but you can not wrap this call into a template because of this bug. A workaround as mentioned by Andrej Mitrovic is adding static to the getAttribute template declaration. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 23 23:57:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 06:57:28 +0000 (UTC) Subject: [Issue 10709] New: reduce 1-function + no seed, wrong type inference Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10709 Summary: reduce 1-function + no seed, wrong type inference Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: monarchdodra at gmail.com ReportedBy: monarchdodra at gmail.com --- Comment #0 from monarchdodra at gmail.com 2013-07-23 23:57:27 PDT --- When reduce is not given a seed, it takes the ranges "front" as a first element, however, seed's type should be that of the result of calling "fun". This is relevent for a function for example, that takes int, and returns a double, or a function that takes operates on const(char)[], and is passed a string: In both case, reduce will error out when trying to store the result (eg double) into the seed (eg int). What is interesting is that "reduce!fun" gets it wrong, but "reduce!(fun, fun...)" gets it right. //---- import std.stdio, std.algorithm; void main(string[] args) { { enum foo = "a + 0.5 * b"; auto r = [0, 1, 2, 3]; //auto r1 = reduce!foo(r); //<-- HERE auto r2 = reduce!(foo, foo,)(r); //writeln(r1); writeln(r2); } { const(char)[] foo(const(char)[], const(char)[]); string[] r = ["hello", "world"]; //auto r1 = reduce!foo(r); //<-- HERE auto r2 = reduce!(foo, foo,)(r); //writeln(r1); writeln(r2); } } //---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 00:18:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 07:18:28 +0000 (UTC) Subject: [Issue 10676] excessive compilation times with optimized PIC build In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10676 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-24 00:18:27 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6ae4c60f8ddf38fe7cc4c41a8db76d74d10f8964 Merge pull request #2375 from WalterBright/fix10676 fix Issue 10676 - excessive compilation times with optimized PIC build -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 00:20:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 07:20:07 +0000 (UTC) Subject: [Issue 10676] excessive compilation times with optimized PIC build In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10676 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 00:59:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 07:59:20 +0000 (UTC) Subject: [Issue 10702] Undefined identifier '_xopCmp' In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10702 Denis Shelomovskij changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #2 from Denis Shelomovskij 2013-07-24 11:59:18 MSD --- (In reply to comment #1) > dmd/pull/2321 requires druntime change druntime/pull/543, so you need to update > your local druntime repo. Sorry, forgot to rebuild runtime. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 01:11:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 08:11:07 +0000 (UTC) Subject: [Issue 10672] (D1 only) struct initializer treated as lambda literal In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10672 Dicebot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #3 from Dicebot 2013-07-24 01:11:05 PDT --- Yeah, sorry for the fuss, must be inattention from my side. Closing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 04:14:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 11:14:46 +0000 (UTC) Subject: [Issue 10688] Misleading error message when attempting a "private override" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10688 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-24 04:14:44 PDT --- https://github.com/D-Programming-Language/dmd/pull/2376 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 04:57:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 11:57:46 +0000 (UTC) Subject: [Issue 10568] CTFE rejects function pointer safety casts In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10568 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |henning at still-hidden.de Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 05:07:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 12:07:33 +0000 (UTC) Subject: [Issue 5325] Mutable references to const/immutable/shared classes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5325 Martin Nowak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code at dawg.eu --- Comment #2 from Martin Nowak 2013-07-24 05:07:31 PDT --- How about making a distinction between const(Object) and const Object? I think it would be less intrusive and more in line with the const(void)* vs. const void* behavior. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 05:22:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 12:22:54 +0000 (UTC) Subject: [Issue 5325] Mutable references to const/immutable/shared classes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5325 --- Comment #3 from Michel Fortin 2013-07-24 08:22:53 EDT --- (In reply to comment #2) > How about making a distinction between const(Object) and const Object? > I think it would be less intrusive and more in line with the const(void)* vs. > const void* behavior. That'll only work in the context where you're declaring a tail-const variable of type Object. If you're declaring an array of tail-const objects, or passing a tail-const object as a template parameter, you can't omit the parenthesis. But the ref postfix works: const(Object)ref[] arrayOfTailConstObjects; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 05:51:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 12:51:35 +0000 (UTC) Subject: [Issue 9921] Enum variables of type void should be illegal In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9921 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |henning at still-hidden.de Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 07:07:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 14:07:51 +0000 (UTC) Subject: [Issue 10710] New: shared phobos library doesn't work on all linux distributions Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 Summary: shared phobos library doesn't work on all linux distributions Product: D Version: D2 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: installer AssignedTo: nobody at puremagic.com ReportedBy: code at dawg.eu --- Comment #0 from Martin Nowak 2013-07-24 07:07:49 PDT --- The problem is that the currently distributed libphobos2.so is linked against a GnuTLS version of libcurl (libcurl-gnutls.so.4) but Fedora only ships with an OpenSSL version of that library. ---- ldd -r /usr/lib64/libphobos2.so ---- ldd: warning: you do not have execution permission for `/usr/lib64/libphobos2.so' linux-vdso.so.1 => (0x00007fffbcd30000) libcurl-gnutls.so.4 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6cfdf75000) libm.so.6 => /lib64/libm.so.6 (0x00007f6cfdc74000) librt.so.1 => /lib64/librt.so.1 (0x00007f6cfda6c000) libc.so.6 => /lib64/libc.so.6 (0x00007f6cfd6b3000) /lib64/ld-linux-x86-64.so.2 (0x0000003dc8c00000) undefined symbol: _Dmain (/usr/lib64/libphobos2.so) undefined symbol: curl_easy_setopt, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_slist_append, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_slist_free_all, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_global_cleanup, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_easy_strerror, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_easy_init, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_easy_cleanup, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_easy_duphandle, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_easy_perform, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_easy_pause, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) undefined symbol: curl_global_init, version CURL_GNUTLS_3 (/usr/lib64/libphobos2.so) ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 07:16:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 14:16:14 +0000 (UTC) Subject: [Issue 10711] New: shared phobos library should not depend on _Dmain Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10711 Summary: shared phobos library should not depend on _Dmain Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: code at dawg.eu --- Comment #0 from Martin Nowak 2013-07-24 07:16:13 PDT --- When building shared D libraries the function _Dmain remains unresolved. This is because a C main function is part of druntime. To fix this we should generate the C main function in the glue layer of the compiler and only do that if a D main function is present. This needs some refactoring in druntime first so that the function becomes reasonably simple, e.g. something along this line. extern(C) int main(int argc, char*[] argv) { auto rc = rt_init(argv[0 .. argc]); if (rc == 0) { runMain(); rc = rt_term(); } return rc; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 08:07:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 15:07:05 +0000 (UTC) Subject: [Issue 5325] Mutable references to const/immutable/shared classes In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5325 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #4 from monarchdodra at gmail.com 2013-07-24 08:07:04 PDT --- (In reply to comment #3) > (In reply to comment #2) > > How about making a distinction between const(Object) and const Object? > > I think it would be less intrusive and more in line with the const(void)* vs. > > const void* behavior. > > That'll only work in the context where you're declaring a tail-const variable > of type Object. If you're declaring an array of tail-const objects, or passing > a tail-const object as a template parameter, you can't omit the parenthesis. > But the ref postfix works: > > const(Object)ref[] arrayOfTailConstObjects; Note that you can use std.typecons.Rebindable to achieve what you are doing: Rebindable!C //Creates a simple an alias to C Rebindable!(immutable C) Creates a mutable object that holds an immutable C. Rebindable!(const C) Creates a mutable object that can hold any reference to C. The thing is very light weight, so in theory, you can use it, and you should have 0 overhead (in release)... Well, except if you use it inside algorithms like emplace/array or whatnot, as they'll notice an elaborate opAssign, and take a slower road. It is, of course, pure and nothrow, but apparently, it is not @safe/@trusted, but I don't see why... It should. I'll make a mental note to do it. Unfortunately, it requires an import, and looks like ass. But it's your current workaround. wish we had something simpler and more idomatic, but that's they way it is. How does C# deal with this? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 10:32:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 17:32:56 +0000 (UTC) Subject: [Issue 10031] Link to old wiki on dlang.org In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10031 Jameson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |beatgammit at gmail.com --- Comment #3 from Jameson 2013-07-24 10:32:52 PDT --- I've submitted a pull request: https://github.com/CyberShadow/DFeed/pull/14 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 11:19:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 18:19:31 +0000 (UTC) Subject: [Issue 8713] Allow passing arguments to templates in CTFE In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8713 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #3 from Don 2013-07-24 11:19:29 PDT --- This idea has some severe problems. For example, this code currently compiles: --- int foo(int x) { return 1; } auto bar(int x) { if (__ctfe) return foo(x); assert(0); } auto baz(int x) { return bar(x); } ------- But if you changed that to return foo!(x), and defined foo as: template foo(int x) { static if (x == 0) enum foo = 0.0; else enum foo = "abc"; } then baz doesn't have a return type -- the return type of baz(0) is different to the return type of baz(1). You get no idea of this from reading baz() on its own. This is merely one of many problems with this idea. Closing this as invalid. At the very least, it would need a DIP. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 11:36:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 18:36:04 +0000 (UTC) Subject: [Issue 8119] Cannot cast from void* to forwarded struct pointer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8119 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid CC| |henning at still-hidden.de --- Comment #2 from Henning Pohl 2013-07-24 11:36:03 PDT --- https://github.com/D-Programming-Language/dmd/pull/2378 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 11:37:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 18:37:59 +0000 (UTC) Subject: [Issue 10156] Can't handle usage of TypeTuple argument in templated function In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10156 Jonathan Crapuchettes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Jonathan Crapuchettes 2013-07-24 11:37:58 PDT --- Working in 2.063.2. Thank you! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 12:29:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 19:29:56 +0000 (UTC) Subject: [Issue 7883] Compiler segfaults with double inheritance and function contract In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7883 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de --- Comment #8 from Henning Pohl 2013-07-24 12:29:54 PDT --- https://github.com/D-Programming-Language/dmd/pull/2379 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 13:23:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 20:23:22 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-24 13:23:21 PDT --- Yes, this is the issue Jordi Sayol has been talking about. We couldn't find an acceptable solution (Jordi suggested making a custom build of libcurl on Ubuntu, while that works, I regard that as impractical for 3rd parties wanting to fork/build phobos from the repository). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 14:58:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 24 Jul 2013 21:58:10 +0000 (UTC) Subject: [Issue 6711] "with" doesn't work with "alias this" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6711 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de --- Comment #5 from Henning Pohl 2013-07-24 14:58:08 PDT --- https://github.com/D-Programming-Language/dmd/pull/2380 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 20:35:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 03:35:49 +0000 (UTC) Subject: [Issue 10694] wrong purity check for static variables with impure destructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10694 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-24 20:35:46 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/33dda1f177478c34113b47dcd24cd54c08100cb4 fix issue 10694 - wrong purity check for static variables with impure destructor https://github.com/D-Programming-Language/dmd/commit/2b1bc0eea17bd2f7497f73285d3411079844c704 Merge pull request #2373 from hpohl/10694 fix issue 10694 - wrong purity check for static variables with impure destructor -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 20:36:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 03:36:06 +0000 (UTC) Subject: [Issue 10694] wrong purity check for static variables with impure destructor In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10694 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 24 21:21:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 04:21:04 +0000 (UTC) Subject: [Issue 10693] cartesianProduct with over 7 ranges causes segfault at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10693 --- Comment #3 from hsteoh at quickfur.ath.cx 2013-07-24 21:21:02 PDT --- This is likely because there are a lot of recursive templates involved in the implementation of cartesianProduct, and DMD is running out of memory. Probably the implementation has to be redesigned to use less templates. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 00:05:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 07:05:08 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 Jacob Carlborg changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |doob at me.com --- Comment #2 from Jacob Carlborg 2013-07-25 00:04:50 PDT --- Why do we want to link to the GnuTLS version? Can't we link with the system default or something like that? I find this page describing some differences between the SSL libraries supported by libcurl. http://curl.haxx.se/docs/ssl-compared.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 01:04:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 08:04:28 +0000 (UTC) Subject: [Issue 10686] No [] operator overload for immutable Tuple In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10686 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-25 01:04:26 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/d61085c3751420b1d41c041199dd05e163120db6 fix Issue 10686 - No [] operator overload for immutable Tuple https://github.com/D-Programming-Language/phobos/commit/ffe080e908b15525edb453102eb7c96b78ed2fe7 Merge pull request #1428 from 9rnsr/fix10686 [REG2.064a] Issue 10686 - No [] operator overload for immutable Tuple MERGED. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 01:09:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 08:09:52 +0000 (UTC) Subject: [Issue 10712] New: Compiletime foreach loop Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10712 Summary: Compiletime foreach loop Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: temtaime at gmail.com --- Comment #0 from Temtaime 2013-07-25 01:09:52 PDT --- Sometimes it's neccessary to organize compiletime loop/unroll another loop for better perfomance. I'd make that simple template: template IndexTuple(int e, int s = 0, T...) { static if(s == e) alias IndexTuple = T; else static if(s > e) alias IndexTuple = IndexTuple!(e, s - 1, T, s); else alias IndexTuple = IndexTuple!(e, s + 1, T, s); } Use: foreach(idx; IndexTuple!10) writeln(idx); // prints 0, 1, ..., 9 foreach(idx; IndexTuple!(10, 2)) writeln(idx); // prints 2, 3, ..., 9 foreach(idx; IndexTuple!-10) writeln(idx); // prints 0, -1, ..., -9 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 01:25:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 08:25:12 +0000 (UTC) Subject: [Issue 10693] cartesianProduct with over 7 ranges causes segfault at compile time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10693 Peter Alexander changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |peter.alexander.au at gmail.co | |m --- Comment #4 from Peter Alexander 2013-07-25 01:25:10 PDT --- This is caused by symbol sizes: int[] a, b, c, d; writeln(typeof(cartesianProduct(a, b)).mangleof.length); writeln(typeof(cartesianProduct(a, b, c)).mangleof.length); writeln(typeof(cartesianProduct(a, b, c, d)).mangleof.length); 534 4025 25003 It's growing exponentially per parameter. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 01:39:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 08:39:23 +0000 (UTC) Subject: [Issue 10708] Class members as template alias parameters not CTFE-able In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10708 --- Comment #1 from Don 2013-07-25 01:39:22 PDT --- This isn't actually a CTFE issue. Something weird is happening here, maybe related to UFCS. The declaration of c is actually being transformed into: enum c = this.getAttribute!(TestClass.a); and that's the 'this' which CTFE is complaining about. Bizarrely, marking the template as 'static' prevents that incorrect 'this' from being added. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 01:42:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 08:42:00 +0000 (UTC) Subject: [Issue 10686] No [] operator overload for immutable Tuple In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10686 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 02:24:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 09:24:24 +0000 (UTC) Subject: [Issue 10073] Default opEquals depends on class declaration order with DMD HEAD In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10073 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-25 02:24:20 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0675c0feabaa9af257c523a4738bcdb78df26dab fix Issue 10073 - Default opEquals depends on class declaration order with DMD HEAD Resolve forward reference correctly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 02:24:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 09:24:37 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #8 from github-bugzilla at puremagic.com 2013-07-25 02:24:27 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f7d34abe745751326f26dc3ac203af01e151bdea Additional fix for issue 10567 in order to generate correct TypeInfo https://github.com/D-Programming-Language/dmd/commit/e25184bce39f87438e8170af624ea1bd35bbc7cc Merge pull request #2374 from 9rnsr/fix10567 Additional fix for issue 10567 in order to generate correct TypeInfo -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 03:12:49 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 10:12:49 +0000 (UTC) Subject: [Issue 10712] Compiletime foreach loop In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10712 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #1 from monarchdodra at gmail.com 2013-07-25 03:12:47 PDT --- (In reply to comment #0) > Sometimes it's neccessary to organize compiletime loop/unroll another loop for > better perfomance. > > I'd make that simple template: > > template IndexTuple(int e, int s = 0, T...) { > static if(s == e) > alias IndexTuple = T; > else > static if(s > e) > alias IndexTuple = IndexTuple!(e, s - 1, T, s); > else > alias IndexTuple = IndexTuple!(e, s + 1, T, s); > } > > Use: > foreach(idx; IndexTuple!10) > writeln(idx); // prints 0, 1, ..., 9 > > foreach(idx; IndexTuple!(10, 2)) > writeln(idx); // prints 2, 3, ..., 9 > > foreach(idx; IndexTuple!-10) > writeln(idx); // prints 0, -1, ..., -9 It think this already exists in phobos somewhere, though I don't remember where though, and it probably wasn't good for public use. In any case, I think the useage should more closely resemble what iota does. For example: IndexTuple!(2, 10)) vs IndexTuple!(10, 2)) or IndexTuple!(0, -10, -1)) vs IndexTuple!(0, -10)) Arguably, iota accepts "iota(10)", but I (and others) think that is a retarded idea, when typing "iota(0, 10)", is just and easy. I think we should avoid making the same mistakes. Also, it should be parameterizable on iteration type. Here is a rough sketch of an implementation that does this. import std.stdio, std.traits; template IndexTuple(alias l, alias h) { alias IndexTuple = IndexTupleImpl!(l, h, 1); } template IndexTuple(alias l, alias h, alias inc) { alias IndexTuple = IndexTupleImpl!(l, h, inc); } template IndexTupleImpl(alias l, alias h, alias inc, T...) { alias E = CommonType!(l, h, inc); static if (inc == 0) static assert(0, "increment must be non-0"); else static if (inc > 0 && l >= h) alias IndexTupleImpl = T; else static if(inc < 0 && l <= h) alias IndexTupleImpl = T; else alias IndexTupleImpl = IndexTupleImpl!(cast(E)(l + inc), h, inc, T, l); } void main() { foreach(idx; IndexTuple!(0, 0)) write(idx, ' '); // prints writeln(); foreach(idx; IndexTuple!(0, 10)) write(idx, ' '); // prints 0, 1, ..., 9 writeln(); foreach(idx; IndexTuple!(2, 10)) write(idx, ' '); // prints 2, 3, ..., 9 writeln(); foreach(idx; IndexTuple!(0, -10, -1)) write(idx, ' '); // prints 0, -1, ..., -9 writeln(); foreach_reverse(idx; IndexTuple!(-9, 1)) write(idx, ' '); // prints 0, -1, ..., -9 writeln(); foreach(idx; IndexTuple!(0.5, 10)) write(idx, ' '); // prints 0.5, 1.5, ..., 9.5 writeln(); foreach(idx; IndexTuple!(0, 1, 0.1)) write(idx, ' '); // prints 0 0.1 ... 0.9 writeln(); foreach(idx; IndexTuple!('a', cast(char)('z' + 1), cast(char)1)) write(idx, ' '); // prints a b ... z writeln(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 03:52:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 10:52:37 +0000 (UTC) Subject: [Issue 10712] Compiletime foreach loop In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10712 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #2 from bearophile_hugs at eml.cc 2013-07-25 03:52:36 PDT --- Dupe of Issue 4085 ? > Arguably, iota accepts "iota(10)", but I (and others) think that is a retarded > idea, when typing "iota(0, 10)", is just and easy. I think we should avoid > making the same mistakes. I requested that to Andrei. And I still think it's a good idea, it comes from Python iterations: >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Discussing iota(10) is off topic here, but if you want you can explain here or in D.learn. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 03:58:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 10:58:36 +0000 (UTC) Subject: [Issue 10712] Compiletime foreach loop In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10712 --- Comment #3 from bearophile_hugs at eml.cc 2013-07-25 03:58:35 PDT --- (In reply to comment #2) > >>> range(10) > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > > Discussing iota(10) is off topic here, but if you want you can explain here or > in D.learn. In D the single argument iota allows you to write UFCS chains like: ....reduce!(...).iota.... If you require the zero it breaks the linearity, and the zero is very common: 0.iota(....reduce!(...)).... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 04:11:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 11:11:04 +0000 (UTC) Subject: [Issue 10712] Compiletime foreach loop In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10712 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #4 from monarchdodra at gmail.com 2013-07-25 04:11:02 PDT --- (In reply to comment #2) > Dupe of Issue 4085 ? Looks like it. I also like the name "Iota!(0, 10, 2)": Imediatly clear. > > Arguably, iota accepts "iota(10)", but I (and others) think that is a retarded > > idea, when typing "iota(0, 10)", is just and easy. I think we should avoid > > making the same mistakes. > > I requested that to Andrei. And I still think it's a good idea, it comes from > Python iterations: > > >>> range(10) > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > > Discussing iota(10) is off topic here, but if you want you can explain here or > in D.learn. I think I remember a thread about this. But if there is existing reasons for doing it that way, I'm not going to go against it. (In reply to comment #3) > (In reply to comment #2) > > > >>> range(10) > > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] > > > > Discussing iota(10) is off topic here, but if you want you can explain here or > > in D.learn. > > In D the single argument iota allows you to write UFCS chains like: > > ....reduce!(...).iota.... That's a good point. Closing as dup. *** This issue has been marked as a duplicate of issue 4085 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 04:11:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 11:11:05 +0000 (UTC) Subject: [Issue 4085] Steps toward a static foreach In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4085 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |temtaime at gmail.com --- Comment #3 from monarchdodra at gmail.com 2013-07-25 04:11:03 PDT --- *** Issue 10712 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: ------- From d-bugmail at puremagic.com Thu Jul 25 04:20:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 11:20:06 +0000 (UTC) Subject: [Issue 4085] Steps toward a static foreach In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4085 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #4 from monarchdodra at gmail.com 2013-07-25 04:20:03 PDT --- (In reply to comment #3) > *** Issue 10712 has been marked as a duplicate of this issue. *** Copy pasting a proposed implementation from 10712. Pretty much the same thing, but also handles indiscriminate types. It passes the prior tests, as well as handles the useage with doubles, or chars: //-------- template Iota(alias h) { alias Iota = IotaImpl!(0, h, 1); } template Iota(alias l, alias h) { alias Iota = IotaImpl!(l, h, 1); } template Iota(alias l, alias h, alias inc) { alias Iota = IotaImpl!(l, h, inc); } template IotaImpl(alias l, alias h, alias inc, T...) { alias E = CommonType!(l, h, inc); static if (inc == 0) static assert(0, "increment must be non-0"); else static if (inc > 0 && l >= h) alias IotaImpl = T; else static if(inc < 0 && l <= h) alias IotaImpl = T; else alias IotaImpl = IotaImpl!(cast(E)(l + inc), h, inc, T, cast(E)l); } //-------- //-------- foreach(idx; Iota!(0, 0)) write(idx, ' '); // prints writeln(); foreach(idx; Iota!(0, 10)) write(idx, ' '); // prints 0, 1, ..., 9 writeln(); foreach(idx; Iota!(2, 10)) write(idx, ' '); // prints 2, 3, ..., 9 writeln(); foreach(idx; Iota!(0, -10, -1)) write(idx, ' '); // prints 0, -1, ..., -9 writeln(); foreach_reverse(idx; Iota!(-9, 1)) write(idx, ' '); // prints 0, -1, ..., -9 writeln(); foreach(idx; Iota!(0.5, 10)) write(idx, ' '); // prints 0.5, 1.5, ..., 9.5 writeln(); foreach(idx; Iota!(0, 1, 0.1)) write(idx, ' '); // prints 0 0.1 ... 0.9 writeln(); foreach(idx; Iota!('a', cast(char)('z' + 1), cast(char)1)) write(idx, ' '); // prints a b ... z writeln(); //-------- Maybe it's time to submit this to phobos? This belongs in typecons? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 04:28:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 11:28:54 +0000 (UTC) Subject: [Issue 4085] Steps toward a static foreach In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4085 --- Comment #5 from Temtaime 2013-07-25 04:28:53 PDT --- I'm agree with Monarchdodra. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 04:53:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 11:53:47 +0000 (UTC) Subject: [Issue 4085] Steps toward a static foreach In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4085 --- Comment #6 from bearophile_hugs at eml.cc 2013-07-25 04:53:45 PDT --- (In reply to comment #4) > Copy pasting a proposed implementation from 10712. Pretty much the same thing, > but also handles indiscriminate types. It passes the prior tests, as well as > handles the useage with doubles, or chars: Good (despite in my code I avoid using std.range.iota() with floating point numbers, because to me it seems a bit bug-prone). > Maybe it's time to submit this to phobos? I prefer a "static foreach" in the D language, even a very simple one (example: you can't use a foreach(Iota) at module scope). But in the meantime it's handy to have a Iota() in Phobos. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 07:11:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 14:11:01 +0000 (UTC) Subject: [Issue 6058] Contract inheritance causes compiler error In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6058 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |henning at still-hidden.de Resolution| |DUPLICATE --- Comment #2 from Henning Pohl 2013-07-25 07:11:00 PDT --- *** This issue has been marked as a duplicate of issue 10479 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 07:11:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 14:11:03 +0000 (UTC) Subject: [Issue 10479] cannot pass implicitly to base class casted result to out contract by ref In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10479 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathias.baumann at sociomantic | |.com --- Comment #4 from Henning Pohl 2013-07-25 07:11:00 PDT --- *** Issue 6058 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: ------- From d-bugmail at puremagic.com Thu Jul 25 09:31:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 16:31:19 +0000 (UTC) Subject: [Issue 10118] BigInt as associative array key wrong behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10118 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #9 from hsteoh at quickfur.ath.cx 2013-07-25 09:31:17 PDT --- Verified fixed in dmd git HEAD. Thanks for the fast response, Kenji!! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 11:05:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 18:05:36 +0000 (UTC) Subject: [Issue 10567] Typeinfo.compare has unreasonable signature requirements on opCmp In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10567 --- Comment #9 from hsteoh at quickfur.ath.cx 2013-07-25 11:05:34 PDT --- Hi Kenji, It seems that the latest pull has fixed this bug. Is there anything else that must be fixed? (You mentioned that this was only a "partial" fix?) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 11:05:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 18:05:41 +0000 (UTC) Subject: [Issue 9832] Partially library-defined stack-allocated variable length arrays In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9832 --- Comment #1 from bearophile_hugs at eml.cc 2013-07-25 11:05:40 PDT --- See also for changes in C++14: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 12:10:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 19:10:14 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #3 from Martin Nowak 2013-07-25 12:10:13 PDT --- It assumed that GnuTLS is default version on Debian but this page suggest it's not. http://packages.debian.org/search?keywords=libcurl3 So we need to find out why we're linking against the wrong library. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 12:37:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 19:37:11 +0000 (UTC) Subject: [Issue 10688] Misleading error message when attempting a "private override" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10688 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-25 12:37:10 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6663240705598be8ffb16d2b2a88da7246bcd599 fix issue 10688 - Misleading error message when attempting a "private override" https://github.com/D-Programming-Language/dmd/commit/e0e73f6198f0e1cb5344d67f842ba9b74ec9ff6a Merge pull request #2376 from hpohl/10688 [enh] fix issue 10688 - Misleading error message when attempting a "private override" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 12:37:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 19:37:20 +0000 (UTC) Subject: [Issue 10688] Misleading error message when attempting a "private override" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10688 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 15:14:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 22:14:08 +0000 (UTC) Subject: [Issue 10713] New: ICE with typeof(this.nonExistingField) in method signature Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10713 Summary: ICE with typeof(this.nonExistingField) in method signature Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: minor Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thecybershadow at gmail.com --- Comment #0 from Vladimir Panteleev 2013-07-26 01:14:07 EEST --- struct S { void f(typeof(this.nonExistingField) a) {} } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 15:25:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 22:25:14 +0000 (UTC) Subject: [Issue 10601] std.path.setExtension leaves trailing dot if extension is empty In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10601 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-25 15:25:13 PDT --- https://github.com/D-Programming-Language/phobos/pull/1409 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 15:55:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 22:55:23 +0000 (UTC) Subject: [Issue 10714] New: inlining issue with core.bitop.bt no longer being an intrinsic Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10714 Summary: inlining issue with core.bitop.bt no longer being an intrinsic Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: code at dawg.eu --- Comment #0 from Martin Nowak 2013-07-25 15:55:22 PDT --- With https://github.com/D-Programming-Language/druntime/pull/388 core.bitop.bt was changed from an intrinsic to a function and relies on the optimizer to recognize the pattern. While that work inlining the function call might fail resulting in a net performance drawback. I think we should keep the pattern recognition but to core.bitop.bt back into an intrinsic. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 16:00:36 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 23:00:36 +0000 (UTC) Subject: [Issue 10715] New: negated bit test (bt) not recognized by optimizer Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10715 Summary: negated bit test (bt) not recognized by optimizer Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: code at dawg.eu --- Comment #0 from Martin Nowak 2013-07-25 16:00:35 PDT --- bool bt(in uint[] ary, size_t bitnum) { return !!(ary[bitnum >> 5] & 1 << (bitnum & 31)); // uses bt } bool neg_bt(in uint[] ary, size_t bitnum) { return !(ary[bitnum >> 5] & 1 << (bitnum & 31)); // does not use bt } The bit test pattern recognition was added with https://github.com/D-Programming-Language/dmd/pull/1509. It does not work for negated bit tests though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 16:21:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 23:21:37 +0000 (UTC) Subject: [Issue 10685] Immutable interval foreach to propagate index value range In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10685 --- Comment #2 from bearophile_hugs at eml.cc 2013-07-25 16:21:34 PDT --- Another code example that becomes valid void main() { char[26] arr; foreach (immutable i, ref c; arr) c = 'a' + i; } Currently gives: test.d(4): Error: cannot implicitly convert expression (97u + i) of type uint to char But 'i' should have a static range of [0, 25] so 'a'+i should be in the acceptable range for a char. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 16:52:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 25 Jul 2013 23:52:01 +0000 (UTC) Subject: [Issue 10714] inlining issue with core.bitop.bt no longer being an intrinsic In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10714 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #1 from bearophile_hugs at eml.cc 2013-07-25 16:52:00 PDT --- (In reply to comment #0) > I think we should keep the pattern recognition but to core.bitop.bt back into > an intrinsic. For the bit rotations the situation is even worse (see Issue 5728 and Issue 6829 ), because in Phobos we don't even have the function that contains the recognized pattern, so it's kind of easy for programmers to write the pattern wrong or for compilers to miss the pattern. (Currently both dmd and ldc2 don't recognize some rotations.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 17:09:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 00:09:10 +0000 (UTC) Subject: [Issue 4085] Steps toward a static foreach In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4085 --- Comment #7 from bearophile_hugs at eml.cc 2013-07-25 17:09:08 PDT --- (In reply to comment #4) > Copy pasting a proposed implementation from 10712. Pretty much the same thing, > but also handles indiscriminate types. It passes the prior tests, as well as > handles the useage with doubles, or chars: Just a reminder: elsewhere I asked for an improvement to iota(), to let it optionally accept a string (like std.random.uniform) that allows to generate complete intervals of a type or handy closed intervals: iota!"[]"('a', 'z') iota!"[]"(cast(ubyte)0, cast(ubyte)255) Currently I think it's impossible to generate the full range of a type like ubyes with iota, and it's not handy to generate the complete range of lowercase char letters, you need to use iota('a', '{'), that currently doesn't work for other reasons. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 17:12:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 00:12:01 +0000 (UTC) Subject: [Issue 10466] Optional "[]" syntax for std.range.iota too In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10466 --- Comment #1 from bearophile_hugs at eml.cc 2013-07-25 17:12:00 PDT --- Another use case: auto lazy_lower_case = iota!"[]"('a', 'z'); Currently you should use this that is much less handy (and it doesn't work for other reasons): iota('a', '{') -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 20:00:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 03:00:52 +0000 (UTC) Subject: [Issue 8119] Cannot cast from void* to forwarded struct pointer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8119 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-25 20:00:43 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/759439c1b5924e94039034588070ff5982b58bf5 fix issue 8119 - Cannot cast from void* to forwarded struct pointer https://github.com/D-Programming-Language/dmd/commit/99b7b7ef65bea926fa29fb2088f7ff2e7f1c5f89 Merge pull request #2378 from hpohl/8119 fix issue 8119 - Cannot cast from void* to forwarded struct pointer -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 20:01:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 03:01:12 +0000 (UTC) Subject: [Issue 7883] Compiler segfaults with double inheritance and function contract In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7883 --- Comment #9 from github-bugzilla at puremagic.com 2013-07-25 20:01:03 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ba2caff1a4819fecd36954a627f07019ec5ff99c fix issue 7883 - Compiler segfaults with double inheritance and function contract https://github.com/D-Programming-Language/dmd/commit/ba1ed2c4aaf52edc90e8cd64e736896b31ecf012 Merge pull request #2379 from hpohl/7883 fix issue 7883 - Compiler segfaults with double inheritance and function contract -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 20:03:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 03:03:06 +0000 (UTC) Subject: [Issue 6711] "with" doesn't work with "alias this" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6711 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-25 20:02:59 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/771b1ac53e94016e23483f99ce172cb464cf6594 fix issue 6711 - "with" doesn't work with "alias this" https://github.com/D-Programming-Language/dmd/commit/dfc7624ccb106b775bbd8df3120bc128ad46fd79 Merge pull request #2380 from hpohl/6711 fix issue 6711 - "with" doesn't work with "alias this" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 20:07:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 03:07:17 +0000 (UTC) Subject: [Issue 6711] "with" doesn't work with "alias this" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6711 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 20:08:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 03:08:48 +0000 (UTC) Subject: [Issue 7883] (D1 only) Compiler segfaults with double inheritance and function contract In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7883 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Version|D1 & D2 |D1 Summary|Compiler segfaults with |(D1 only) Compiler |double inheritance and |segfaults with double |function contract |inheritance and function | |contract --- Comment #10 from Kenji Hara 2013-07-25 20:08:44 PDT --- Fixed in D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 20:09:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 03:09:16 +0000 (UTC) Subject: [Issue 8119] Cannot cast from void* to forwarded struct pointer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8119 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Thu Jul 25 21:41:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 04:41:20 +0000 (UTC) Subject: [Issue 10713] [REG2.063] ICE with typeof(this.nonExistingField) in method signature In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10713 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull Summary|ICE with |[REG2.063] ICE with |typeof(this.nonExistingFiel |typeof(this.nonExistingFiel |d) in method signature |d) in method signature Severity|minor |regression --- Comment #1 from Kenji Hara 2013-07-25 21:41:15 PDT --- https://github.com/D-Programming-Language/dmd/pull/2382 This is a regression from 2.063 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 00:12:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 07:12:16 +0000 (UTC) Subject: [Issue 9447] iota should generate char intervals too In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9447 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #4 from monarchdodra at gmail.com 2013-07-26 00:12:08 PDT --- (In reply to comment #3) > (In reply to comment #2) > > It is definitely _not_ the case that adding 1 to a wchar or dchar will > > necessarily result in a valid value. In both of them, there's a block in the > > middle which is invalid. Just like at the implementation of isValidDchar. > > Is this the only restriction though? If that's so, it should be easy to > implement this feature with a single runtime check to verify the range doesn't > go over the invalid block. I think that is a bad idea. We should keep it simple: User asks to iterate over xchars of values low to high, and that is all we should return. When it comes to wchars or dchars, the notion of "invalid" is really in the eye of the beholder anyway. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 00:27:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 07:27:50 +0000 (UTC) Subject: [Issue 4085] Steps toward a static foreach In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4085 --- Comment #8 from monarchdodra at gmail.com 2013-07-26 00:27:42 PDT --- (In reply to comment #7) > (In reply to comment #4) > > > Copy pasting a proposed implementation from 10712. Pretty much the same thing, > > but also handles indiscriminate types. It passes the prior tests, as well as > > handles the useage with doubles, or chars: > > Just a reminder: elsewhere I asked for an improvement to iota(), to let it > optionally accept a string (like std.random.uniform) that allows to generate > complete intervals of a type or handy closed intervals: > > iota!"[]"('a', 'z') > iota!"[]"(cast(ubyte)0, cast(ubyte)255) http://d.puremagic.com/issues/show_bug.cgi?id=10466 I've taken note. I think it is a good idea, but it might be difficult to implement what with all the overloads. > Currently I think it's impossible to generate the full range of a type like > ubyes with iota, and it's not handy to generate the complete range of lowercase > char letters, you need to use iota('a', '{'), that currently doesn't work for > other reasons. http://d.puremagic.com/issues/show_bug.cgi?id=6447 http://d.puremagic.com/issues/show_bug.cgi?id=9447 Fixing the issue of iota and "non built-in integral" is on my "todo" list. BTW, you could also write it as (provided char is accepted at all): iota('a', cast(char)('f' + 1)) or iota!(char,char)('a', 'f'+1); But in both cases, integral promotion kind of gets in the way of "clean" code :/ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 00:50:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 07:50:14 +0000 (UTC) Subject: [Issue 10713] [REG2.063] ICE with typeof(this.nonExistingField) in method signature In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10713 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-26 00:50:13 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8ec7a0d6876d0946d7bff8fe73330b720d1fc6b8 fix Issue 10713 - ICE with typeof(this.nonExistingField) in method signature https://github.com/D-Programming-Language/dmd/commit/21b130d71a73b2d8f27c93bea9560cebeded1e1a Merge pull request #2382 from 9rnsr/fix10713 [REG2.063] Issue 10713 - ICE with typeof(this.nonExistingField) in method signature -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 00:50:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 07:50:26 +0000 (UTC) Subject: [Issue 10713] [REG2.063] ICE with typeof(this.nonExistingField) in method signature In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10713 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 03:05:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 10:05:20 +0000 (UTC) Subject: [Issue 6711] "with" doesn't work with "alias this" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6711 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #7 from Andrej Mitrovic 2013-07-26 03:05:17 PDT --- The test-case in Issue 9807 still doesn't work, so I've reopened this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 03:19:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 10:19:51 +0000 (UTC) Subject: [Issue 10716] New: Horrifically slow compilation for array literals inside functions Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10716 Summary: Horrifically slow compilation for array literals inside functions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: clugdbug at yahoo.com.au --- Comment #0 from Don 2013-07-26 03:19:49 PDT --- I found this in the DMD test suite. One file, test44.d, takes much longer to compile than any of the others. The actual test is basically just this: --- void main() { int [] x = [ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ]; } --- but copy the 1,1,1,1, line a thousand times. The slow compilation happens in the glue layer: compiling with dmd -o- is instantaneous, but dmd -c takes minutes. Which is really silly since it can should just compile to a malloc + memcpy from data segment. Compiling with -O makes it even worse. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 04:19:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 11:19:05 +0000 (UTC) Subject: [Issue 10596] A method with out contract and auto return type causes segfault In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10596 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de --- Comment #2 from Henning Pohl 2013-07-26 04:19:03 PDT --- https://github.com/D-Programming-Language/dmd/pull/2383 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 05:06:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 12:06:15 +0000 (UTC) Subject: [Issue 10717] New: std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 Summary: std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-26 05:06:14 PDT --- If I use functions from std.ascii I am stating that I am working with ASCII chars. Also std.ascii docs say: "All of the functions in std.ascii accept unicode characters but effectively ignore them." So if I use std.ascii.toLower on an ASCII char, in most times (all times so far) I want the result to be a char. If std.ascii.toLower returns a dchar it forces me to use a cast(char) in most (or all) cases. Such cast doesn't increase safety at all, it actually decreases it. So I'd like std.ascii.toLower and std.ascii.toUpper to return char. (This has a severity 'normal' instead of 'enhancement' because I regard that as a bug in the design of those two functions.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 05:11:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 12:11:56 +0000 (UTC) Subject: [Issue 10718] New: std.algorithm.copy should keep the type of the characters it copies Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10718 Summary: std.algorithm.copy should keep the type of the characters it copies Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-26 05:11:55 PDT --- Phobos Range-based functions see strings and char[] to arrays of dchar, but I think that behavour is not good for std.algorithm.copy too: import std.algorithm: copy; void main() { char[5] arr1 = "hello", arr2; arr1[].copy(arr2[]); // Error. dchar[arr1.length] arr3; arr1[].copy(arr3[]); // OK. } (Ali from D learns says that he would expect copy to maintain the same type.) See also: import std.array: array; void main() { char[5] arr = "hello"; pragma(msg, typeof(arr.array)); // Prints: dchar[] } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 05:17:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 12:17:51 +0000 (UTC) Subject: [Issue 10717] std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg at gmx.com Severity|normal |enhancement --- Comment #1 from Jonathan M Davis 2013-07-26 05:17:49 PDT --- I really don't think that this is a bug. By taking dchar, they work with ranges of dchar and allow you to operate on strings that contain Unicode in cases where all you care about are particular ASCII characters (like when you only care about ASCII whitespace in a string - not Unicode whitespace - but the string contains Unicode characters). And as soon the functions accept dchar, they must return dchar, or they'll destroy any Unicode characters that get passed in. A reasonable enhancement request would be to overload these functions with overloads which take char and return char, but there is actual value in having them accept and return dchar, and it would break existing code if they stopped. So, the functions that are there are there to stay, but you may get overloads which operate specifically on char. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 05:45:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 12:45:12 +0000 (UTC) Subject: [Issue 10718] std.algorithm.copy should keep the type of the characters it copies In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10718 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #1 from monarchdodra at gmail.com 2013-07-26 05:45:10 PDT --- (In reply to comment #0) > Phobos Range-based functions see strings and char[] to arrays of dchar, but I > think that behavour is not good for std.algorithm.copy too: > > > import std.algorithm: copy; > void main() { > char[5] arr1 = "hello", arr2; > arr1[].copy(arr2[]); // Error. > dchar[arr1.length] arr3; > arr1[].copy(arr3[]); // OK. > } I think it would be better if copy (like every other phobos algorithm) used the knowledge that a dchar can be converted to a stream of characters, if needed. For example, according to your suggestion, if "std.algorithm.copy" simply iterated on the chars, then copying a unicode "string" into an array of dchar would fail catastrophically, and that is not acceptable at all. EG, this *must* work: string s = "???"; dchar[3] d; s.copy(d[]); On the other hand, we should be able to make this work: dchar[3] d = "???"d; char[] s = new char[](12); d.copy(s); > (Ali from D learns says that he would expect copy to maintain the same type.) I strongly disagree. std.algorithm operates on ranges. a string is a range of dchars. > See also: > > import std.array: array; > void main() { > char[5] arr = "hello"; > pragma(msg, typeof(arr.array)); // Prints: dchar[] > } The documentation of array explicitly says it will behave this way, as it provides an RA range of the iterated range. That is part of its design, and can't change. That said, I had suggested (and partially worked on long ago) the option to specify what types you want array to produce. EG: auto myDoubles = array!double(myRangeOfInts); The same can be obtained with "myRangeOfInts.map!"cast(double)a"().array();", but it is not as convenient. Further more, this suggestion would allow this: dchar[3] d = "???"d; auto s = d[].array!(immutable char)(d); Which would not be possible via a map! workaround. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 07:33:39 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 14:33:39 +0000 (UTC) Subject: [Issue 10717] std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 --- Comment #2 from bearophile_hugs at eml.cc 2013-07-26 07:33:37 PDT --- (In reply to comment #1) > So, the functions that are there are there to stay, but you may get overloads > which operate specifically on char. OK. Thank for your comments and corrections Jonathan. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 07:43:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 14:43:00 +0000 (UTC) Subject: [Issue 10718] std.algorithm.copy should keep the type of the characters it copies In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10718 --- Comment #2 from bearophile_hugs at eml.cc 2013-07-26 07:42:59 PDT --- (In reply to comment #1) > I strongly disagree. std.algorithm operates on ranges. a string is a range of > dchars. In code like this the map yield chars, yet copy converts them to dchar, is this good? import std.range, std.algorithm; void main() { char[5] arr; auto r = 5.iota.map!(i => cast(char)(i + 'a')); static assert(is(typeof(r.front) == char)); // OK r.copy(arr[]); // error } Thank you for your answers. Do you suggest to close down this issue? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 07:47:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 14:47:41 +0000 (UTC) Subject: [Issue 6303] Order of float declaration changes NaN throwing behavior In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6303 Don changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Don 2013-07-26 07:47:40 PDT --- This is a symptom of bug 9813. *** This issue has been marked as a duplicate of issue 9813 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 07:47:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 14:47:42 +0000 (UTC) Subject: [Issue 9813] Signalling NaN initialization does not always work correctly on x86 In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9813 --- Comment #4 from Don 2013-07-26 07:47:40 PDT --- *** Issue 6303 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: ------- From d-bugmail at puremagic.com Fri Jul 26 08:06:31 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 15:06:31 +0000 (UTC) Subject: [Issue 10031] Link to old wiki on dlang.org In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10031 Jameson changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Jameson 2013-07-26 08:06:29 PDT --- Merged and deployed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 09:04:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 16:04:03 +0000 (UTC) Subject: [Issue 6711] "with" doesn't work with "alias this" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6711 --- Comment #8 from Henning Pohl 2013-07-26 09:04:01 PDT --- https://github.com/D-Programming-Language/dmd/pull/2386 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 10:21:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 17:21:28 +0000 (UTC) Subject: [Issue 8781] delegate breaks const/immutable/shared correctness In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8781 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara 2013-07-26 10:21:27 PDT --- *** This issue has been marked as a duplicate of issue 1983 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 10:21:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 17:21:30 +0000 (UTC) Subject: [Issue 1983] Delegates violate const In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=1983 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zan77137 at nifty.com --- Comment #12 from Kenji Hara 2013-07-26 10:21:27 PDT --- *** Issue 8781 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: ------- From d-bugmail at puremagic.com Fri Jul 26 10:34:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 17:34:16 +0000 (UTC) Subject: [Issue 6711] "with" doesn't work with "alias this" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6711 --- Comment #9 from github-bugzilla at puremagic.com 2013-07-26 10:34:14 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/efba4e047b4d2a1da522d418a0491aebe0e68f36 additional fix for issue 6711 https://github.com/D-Programming-Language/dmd/commit/e96ff4d28950603b8a5bd3e8c35511bd3072e7fa Merge pull request #2386 from hpohl/6711 additional fix for issue 6711 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 10:34:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 17:34:24 +0000 (UTC) Subject: [Issue 6711] "with" doesn't work with "alias this" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6711 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 10:34:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 17:34:59 +0000 (UTC) Subject: [Issue 10162] Opposite of std.string.representation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10162 --- Comment #1 from bearophile_hugs at eml.cc 2013-07-26 10:34:57 PDT --- An alternative name for such function is "assumeChars". And it should return char[], const(char)[] or immutable(char)[] according to the input being a ubyte[], const(ubyte)[] or immutable(ubyte)[]. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 10:36:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 17:36:22 +0000 (UTC) Subject: [Issue 10162] Opposite of std.string.representation In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10162 --- Comment #2 from bearophile_hugs at eml.cc 2013-07-26 10:36:22 PDT --- (In reply to comment #1) It could also return wchar[], const(wchar)[], immutable(wchar)[] according to the input being a ushort[], const(ushort)[] or immutable(ushort)[]. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 13:05:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 20:05:22 +0000 (UTC) Subject: [Issue 10201] "= void" initialization should not be allowed in @safe In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10201 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #2 from monarchdodra at gmail.com 2013-07-26 13:05:21 PDT --- (In reply to comment #1) > So it is not that dangerous in that sense, but can be used to workaround some > guarantees provided by disabled constructor. Prohibiting all void initalizers > in @safe may be both more simple and consistent. It is dangerous in the sense that for a struct that is not POD, you are violating its internal integrity, at which point, it has no way to guarantee the safety of its own internal operations. I mentioned this in https://github.com/D-Programming-Language/phobos/pull/1434#issuecomment-21644766 with the example: //---- struct S { private size_t index; private ubyte[1] arr; ref ubyte get() @trusted { return arr.ptr[index]; } } void main() @safe { S s = void; ubyte a = s.get(); } //---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 15:58:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 22:58:53 +0000 (UTC) Subject: [Issue 10596] A method with out contract and auto return type causes segfault In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10596 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-26 15:58:51 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/338998c8894451d83597ad4c274a17ac5b32e5e4 fix issue 10596 - A method with out contract and auto return type causes segfault https://github.com/D-Programming-Language/dmd/commit/87f79bb281b9cbf2b46028a3084f28f2daff164e Merge pull request #2383 from hpohl/10596 fix issue 10596 - A method with out contract and auto return type causes segfault -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 16:14:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 26 Jul 2013 23:14:47 +0000 (UTC) Subject: [Issue 10596] A method with out contract and auto return type causes segfault In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10596 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 17:37:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 00:37:04 +0000 (UTC) Subject: [Issue 10719] New: Loading classes in runtime Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10719 Summary: Loading classes in runtime Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: freeslave93 at gmail.com --- Comment #0 from Roman 2013-07-26 17:37:00 PDT --- There is kinda plugin here (code is for linux or other posix system with dlfcn) Why does it crush when using interface instead of abstract class? (-version=inter) //dinter.d module dinter; version(inter) { pragma(msg, "Using interface"); interface Dinter { int foo(int a, int b); } } else { pragma(msg, "Using abstract class"); abstract class Dinter { int foo(int a, int b); } } //dimpl.d //dmd -shared -fPIC dimpl.d dinter.d -oflibdimpl.so //dmd -shared -fPIC dimpl.d dinter.d -oflibdimpl.so -verstion=inter module dimpl; import dinter; class Dimpl : Dinter { override int foo(int a, int b) { return a+b; } } extern(C) Dinter create() { return new Dimpl; } //dmain.d //dmd dmain.d -L-rpath=. -L-ldl //dmd dmain.d -L-rpath=. -L-ldl -version=inter import dinter; import std.c.linux.linux; import std.string : toStringz; alias extern(C) Dinter function() CreateFn; int main(string[] args) { void* lib = dlopen(toStringz("./libdimpl.so"), RTLD_LAZY); assert(lib); auto create = cast(CreateFn)dlsym(lib, toStringz("create")); assert(create); Dinter d = create(); assert(d.foo(3,7)==10); return 0; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 19:44:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 02:44:20 +0000 (UTC) Subject: [Issue 10716] Horrifically slow compilation for array literals inside functions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10716 --- Comment #1 from Walter Bright 2013-07-26 19:44:18 PDT --- https://github.com/D-Programming-Language/dmd/pull/2388 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Fri Jul 26 20:06:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 03:06:07 +0000 (UTC) Subject: [Issue 10716] Horrifically slow compilation for array literals inside functions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10716 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg at gmx.com --- Comment #2 from Jonathan M Davis 2013-07-26 20:06:03 PDT --- This could be related to bug# 8449. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 02:02:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 09:02:54 +0000 (UTC) Subject: [Issue 10715] negated bit test (bt) not recognized by optimizer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10715 --- Comment #1 from Walter Bright 2013-07-27 02:02:44 PDT --- https://github.com/D-Programming-Language/dmd/pull/2389 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 02:41:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 09:41:07 +0000 (UTC) Subject: [Issue 10717] std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 Jonathan M Davis changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Jonathan M Davis 2013-07-27 02:41:04 PDT --- https://github.com/D-Programming-Language/phobos/pull/1436 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 03:14:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 10:14:34 +0000 (UTC) Subject: [Issue 10715] negated bit test (bt) not recognized by optimizer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10715 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-27 03:14:33 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/13c01c84c4814d2da03acca1f7c2074459da6fb4 fix Issue 10715 - negated bit test (bt) not recognized by optimizer https://github.com/D-Programming-Language/dmd/commit/6619191c9a7c79df69ffd03e5a43e657b3ba9fb0 Merge pull request #2389 from WalterBright/fix10715 fix Issue 10715 - negated bit test (bt) not recognized by optimizer -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 03:25:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 10:25:16 +0000 (UTC) Subject: [Issue 10715] negated bit test (bt) not recognized by optimizer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10715 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 04:35:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 11:35:03 +0000 (UTC) Subject: [Issue 10720] New: ICE with is(aaOfNonCopyableStruct.nonExistingField) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10720 Summary: ICE with is(aaOfNonCopyableStruct.nonExistingField) Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: minor Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thecybershadow at gmail.com --- Comment #0 from Vladimir Panteleev 2013-07-27 14:35:02 EEST --- struct NC { @disable this(this) {} } void main() { NC[string] aa; is(aa.nonExistingField); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 05:12:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 12:12:42 +0000 (UTC) Subject: [Issue 10721] New: ICE with constructor with postcondition Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10721 Summary: ICE with constructor with postcondition Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thecybershadow at gmail.com --- Comment #0 from Vladimir Panteleev 2013-07-27 15:12:40 EEST --- class S { this() out {} body {} } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 05:32:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 12:32:32 +0000 (UTC) Subject: [Issue 10721] ICE with constructor with postcondition In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10721 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-27 05:32:31 PDT --- https://github.com/D-Programming-Language/dmd/pull/2390 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 05:46:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 12:46:06 +0000 (UTC) Subject: [Issue 10717] std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 --- Comment #4 from bearophile_hugs at eml.cc 2013-07-27 05:46:05 PDT --- (In reply to comment #3) > https://github.com/D-Programming-Language/phobos/pull/1436 Thank you again Jonathan :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 06:34:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 13:34:35 +0000 (UTC) Subject: [Issue 10721] ICE with constructor with postcondition In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10721 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-27 06:34:34 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/810ba191bbe9e8d18ab4554f8bbef71893b9dcb3 fix issue 10721 - ICE with constructor with postcondition https://github.com/D-Programming-Language/dmd/commit/8c08391b37c5aa230ac369c11f84dc720ebb20d6 Merge pull request #2390 from hpohl/10721 [REG2.064a] fix issue 10721 - ICE with constructor with postcondition -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 06:46:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 13:46:54 +0000 (UTC) Subject: [Issue 10380] Wrong code using associative array as key type in associative array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10380 --- Comment #8 from hsteoh at quickfur.ath.cx 2013-07-27 06:46:52 PDT --- Hi Denis, Can you check this bug again? Recently Kenji & I made some fixes in this area, and this may be fixed now. Could you verify? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 07:24:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 14:24:09 +0000 (UTC) Subject: [Issue 10380] Wrong code using associative array as key type in associative array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10380 --- Comment #9 from Denis Shelomovskij 2013-07-27 18:24:07 MSD --- (In reply to comment #8) > Hi Denis, > > Can you check this bug again? Recently Kenji & I made some fixes in this area, > and this may be fixed now. Could you verify? Currently `equals` is overriden in `TypeInfo_AssociativeArray` as druntime pull 523 is merged. But it doesn't changes this issue situation as `equals` isn't used. The issue will be fixed if e.g. this pull will be merged: https://github.com/D-Programming-Language/druntime/pull/522 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 07:28:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 14:28:24 +0000 (UTC) Subject: [Issue 10721] ICE with constructor with postcondition In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10721 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 08:02:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 15:02:27 +0000 (UTC) Subject: [Issue 9783] profiling recursive function calls yields bad tree timing In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9783 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 09:43:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 16:43:21 +0000 (UTC) Subject: [Issue 6840] std.conv.maybeTo In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6840 --- Comment #1 from bearophile_hugs at eml.cc 2013-07-27 09:43:19 PDT --- See also: http://dlang.org/phobos/std_exception.html#.ifThrown -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 11:51:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 18:51:59 +0000 (UTC) Subject: [Issue 10715] negated bit test (bt) not recognized by optimizer In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10715 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-27 11:51:56 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f2b173e4993c5552b914a59c40824d35fd1d02ff Merge pull request #2389 from WalterBright/fix10715 fix Issue 10715 - negated bit test (bt) not recognized by optimizer -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 12:51:14 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 19:51:14 +0000 (UTC) Subject: [Issue 10722] New: Regression (2.064 git-head): Cannot interpret struct at compile-time Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10722 Summary: Regression (2.064 git-head): Cannot interpret struct at compile-time Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-27 12:51:13 PDT --- ----- struct Struct { int x; } template GetSomething(S...) { alias GetSomething = int; } void main() { alias X = GetSomething!(Struct.tupleof[0]); } ----- > Error: Cannot interpret Struct at compile time -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 13:10:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 20:10:21 +0000 (UTC) Subject: [Issue 10722] Regression (2.064 git-head): Cannot interpret struct at compile-time In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10722 --- Comment #1 from Andrej Mitrovic 2013-07-27 13:10:20 PDT --- Introduced by e1ce57e - Merge pull request #2136 from donc/future_of_ctfe https://github.com/D-Programming-Language/dmd/pull/2136 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 13:39:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 20:39:09 +0000 (UTC) Subject: [Issue 10678] Win64: wrong code passing small fixed sized array as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10678 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #1 from Walter Bright 2013-07-27 13:39:08 PDT --- Smaller test case: int test(char[5] txt) { return txt[0] + txt[1] + txt[4]; } void main() { char[5] hello = void; hello[0] = 8; hello[1] = 9; hello[4] = 10; int i = test(hello); assert(i == 27); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 13:41:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 20:41:58 +0000 (UTC) Subject: [Issue 10678] Win64: wrong code passing small fixed sized array as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10678 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Version|D2 |D1 & D2 Severity|normal |critical --- Comment #2 from Walter Bright 2013-07-27 13:41:57 PDT --- https://github.com/D-Programming-Language/dmd/pull/2391 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 13:43:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 27 Jul 2013 20:43:54 +0000 (UTC) Subject: [Issue 9586] Win64 5/6/7 struct returns In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9586 --- Comment #1 from Walter Bright 2013-07-27 13:43:53 PDT --- https://github.com/D-Programming-Language/dmd/pull/2391 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 17:23:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 00:23:38 +0000 (UTC) Subject: [Issue 10723] New: std.stdio.File.byLine causes segfault when compiling with -O Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10723 Summary: std.stdio.File.byLine causes segfault when compiling with -O Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: hsteoh at quickfur.ath.cx --- Comment #0 from hsteoh at quickfur.ath.cx 2013-07-27 17:23:36 PDT --- Code: ------ import std.stdio; void main() { try { auto f = File("/non/existent/file").byLine(); } catch(Exception e) { writeln(e.msg); } } ------ Compile command: ------ dmd -O test.d ------ Program output: ------ Segmentation fault ------ Compiling without -O doesn't exhibit this problem. Here's the stacktrace from gdb: #0 0x0000000000440110 in std.stdio.File.detach() () #1 0x000000000043fe09 in std.stdio.File.__dtor() () #2 0x000000000043179a in D main () #3 0x000000000043c854 in rt.dmain2._d_run_main() () #4 0x000000000043c0de in rt.dmain2._d_run_main() () #5 0x000000000043c8b0 in rt.dmain2._d_run_main() () #6 0x000000000043c0de in rt.dmain2._d_run_main() () #7 0x000000000043c09a in _d_run_main () #8 0x000000000043bea0 in main () Looks like -O is causing the compiler to generate wrong code in this case. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 17:27:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 00:27:28 +0000 (UTC) Subject: [Issue 10723] std.stdio.File.byLine causes segfault when compiling with -O In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10723 --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-27 17:27:27 PDT --- P.S. The bug doesn't happen if the try-catch block is removed, or if the File struct is assigned to a temporary variable first, then byLine called on it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 22:28:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:28:06 +0000 (UTC) Subject: [Issue 4419] __gshared static in class has no effect In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4419 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies at gmail.com --- Comment #6 from yebblies 2013-07-28 15:28:04 EST --- I agree that __gshared should imply static. I was very surprised to find this was not how it works. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 22:28:27 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:28:27 +0000 (UTC) Subject: [Issue 10678] Win64: wrong code passing small fixed sized array as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10678 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-27 22:28:26 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/92251d67a0a59d4c22d6cb8c7e7557f8d0109bf3 fix Issue 10678 - Win64: wrong code passing small fixed sized array as function argument https://github.com/D-Programming-Language/dmd/commit/e0eefafa57a5f765f44268507213991ebaacc9db Merge pull request #2391 from WalterBright/fix10678 fix Issue 10678 - Win64: wrong code passing small fixed sized array as f... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 22:33:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:33:24 +0000 (UTC) Subject: [Issue 10571] formattedWrite error with delegate and string In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10571 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from yebblies 2013-07-28 15:33:23 EST --- *** This issue has been marked as a duplicate of issue 9823 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 22:33:24 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:33:24 +0000 (UTC) Subject: [Issue 9823] Delegate accepting element not accepted in std.range.put In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9823 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies at gmail.com --- Comment #1 from yebblies 2013-07-28 15:33:23 EST --- *** Issue 10571 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: ------- From d-bugmail at puremagic.com Sat Jul 27 22:41:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:41:09 +0000 (UTC) Subject: [Issue 10571] formattedWrite error with delegate and string In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10571 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE | --- Comment #2 from yebblies 2013-07-28 15:41:08 EST --- Ok, maybe not. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 22:44:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:44:54 +0000 (UTC) Subject: [Issue 9823] Delegate accepting element not accepted in std.range.put In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9823 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from yebblies 2013-07-28 15:44:53 EST --- Turned into a pull request: https://github.com/D-Programming-Language/phobos/pull/1437 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 22:58:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:58:46 +0000 (UTC) Subject: [Issue 10678] Win64: wrong code passing small fixed sized array as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10678 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-27 22:58:46 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/31b45dbc23f75465b87f25168f4a3ae2bfdc31b2 Merge pull request #2391 from WalterBright/fix10678 fix Issue 10678 - Win64: wrong code passing small fixed sized array as f... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 22:59:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 05:59:35 +0000 (UTC) Subject: [Issue 10678] Win64: wrong code passing small fixed sized array as function argument In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10678 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 23:00:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:00:04 +0000 (UTC) Subject: [Issue 9586] Win64 5/6/7 struct returns In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9586 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Version|D2 |D1 & D2 Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 23:35:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:35:51 +0000 (UTC) Subject: [Issue 2486] taking address of slice rvalue should not be allowed In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=2486 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |FIXED --- Comment #12 from yebblies 2013-07-28 16:35:48 EST --- Appears to be fixed -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 23:37:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:37:53 +0000 (UTC) Subject: [Issue 8843] Statically known slices given as fixed-size array arguments In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8843 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |DUPLICATE --- Comment #1 from yebblies 2013-07-28 16:37:52 EST --- *** This issue has been marked as a duplicate of issue 3652 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 23:37:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:37:56 +0000 (UTC) Subject: [Issue 3652] Allow explicit and implicit casting of dynamic array slices of known size to static array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=3652 --- Comment #6 from yebblies 2013-07-28 16:37:52 EST --- *** Issue 8843 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: ------- From d-bugmail at puremagic.com Sat Jul 27 23:41:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:41:55 +0000 (UTC) Subject: [Issue 7087] Produce compiler diagnostic when escaping slice to local static array In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7087 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yebblies at gmail.com Resolution| |DUPLICATE --- Comment #1 from yebblies 2013-07-28 16:41:54 EST --- *** This issue has been marked as a duplicate of issue 8838 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 23:41:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:41:57 +0000 (UTC) Subject: [Issue 8838] Slicing static arrays should be considered unsafe (@system) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8838 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |acehreli at yahoo.com --- Comment #7 from yebblies 2013-07-28 16:41:54 EST --- *** Issue 7087 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: ------- From d-bugmail at puremagic.com Sat Jul 27 23:46:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:46:28 +0000 (UTC) Subject: [Issue 10724] New: Allow slice of string literal to convert to const(char)* Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 Summary: Allow slice of string literal to convert to const(char)* Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: yebblies at gmail.com --- Comment #0 from yebblies 2013-07-28 16:46:27 EST --- The following code is perfectly safe because the slice happens at compile time, but the conversion is not allowed. void main() { const(char)* s = "abc"[0..$-1]; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sat Jul 27 23:58:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 06:58:28 +0000 (UTC) Subject: [Issue 10724] Allow slice of string literal to convert to const(char)* In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull AssignedTo|nobody at puremagic.com |yebblies at gmail.com --- Comment #1 from yebblies 2013-07-28 16:58:26 EST --- https://github.com/D-Programming-Language/dmd/pull/2392 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 03:42:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 10:42:54 +0000 (UTC) Subject: [Issue 10724] Allow slice of string literal to convert to const(char)* In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #2 from bearophile_hugs at eml.cc 2013-07-28 03:42:51 PDT --- Implicit conversions introduce a bit of dangers in a language. They should be minimized. Instead of this: const(char)* s = "abc"[0..$-1]; What about this? const(char)* s = "abc"[0..$-1].ptr; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 03:52:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 10:52:47 +0000 (UTC) Subject: [Issue 10724] Allow slice of string literal to convert to const(char)* In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 --- Comment #3 from yebblies 2013-07-28 20:52:45 EST --- (In reply to comment #2) > Implicit conversions introduce a bit of dangers in a language. They should be > minimized. > > Instead of this: > const(char)* s = "abc"[0..$-1]; > > What about this? > const(char)* s = "abc"[0..$-1].ptr; The conversion is only safe because the string literal is null-terminated. Explicitly adding .ptr bypasses that, making it unsafe to rely on this. Currently `"abc"[0..$-1]` gets const-folded to (essentially) `cast(string)"ab"`, and not for any reason I can see. It should be just plain "ab", which can convert to a const cstring. The only downside I can see is potential confusion that the above works, but this doesn't: string str = "abc"[0..$-1]; const(char)* s = str; But this is already present with plain string literals, as well as concatenation and probably others. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 07:19:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 14:19:44 +0000 (UTC) Subject: [Issue 10464] Please add forkpty() to std.process In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10464 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at kyllingen.net --- Comment #1 from Lars T. Kyllingstad 2013-07-28 07:19:42 PDT --- forkpty() is a BSD function, not a standard POSIX function, so I don't see how this can be done in a cross-platform manner. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 07:54:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 14:54:26 +0000 (UTC) Subject: [Issue 10580] spawnShell/pipeShell changes some environment variables (incl. PATH) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10580 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at kyllingen.net --- Comment #3 from Lars T. Kyllingstad 2013-07-28 07:54:24 PDT --- I cannot reproduce this on Linux, so it's hard to say what the issue is. It would be great if someone else could try this on OSX. spawnShell() does not touch the environment unless explicitly requested, so I think the answer lies somewhere else. It looks almost like spawnShell() starts the shell as a login shell. In that case it would read various startup scripts, and re-set PATH along with some other environment variables. Could you please run the following commands in a terminal? export PATH=/usr/bin $SHELL -c 'echo $PATH' $SHELL -l -c 'echo $PATH' (Note the single quotes, which delay expansion of the PATH variable.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:03:09 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:03:09 +0000 (UTC) Subject: [Issue 9859] Cannot use inout in delegate In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9859 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-28 08:03:08 PDT --- https://github.com/D-Programming-Language/dmd/pull/2399 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:07:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:07:18 +0000 (UTC) Subject: [Issue 10725] New: DMD can't output Hangul(Korean alphbet) (codepage 949(hangul)) Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10725 Summary: DMD can't output Hangul(Korean alphbet) (codepage 949(hangul)) Product: D Version: D1 & D2 Platform: All OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: rlawlgn507 at naver.com --- Comment #0 from ??? 2013-07-28 08:07:17 PDT --- //I compiled this code import std.stdio; int main() { write("d??"); //'d??' means d language return 0; } //this code outputs 'd???'(codepage 949) //but it outputs when codepage 65001 nomally //I'm not good at english. so I'm begging your understanding. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:09:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:09:15 +0000 (UTC) Subject: [Issue 10725] DMD can't output Hangul(Korean alphbet) (codepage 949(hangul)) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10725 --- Comment #1 from ??? 2013-07-28 08:09:14 PDT --- (In reply to comment #0) > //I compiled this code > > import std.stdio; > > int main() > { > write("d??"); //'d??' means d language > > return 0; > } > > //this code outputs 'd???'(codepage 949) > //but it outputs when codepage 65001 normally > > //I'm not good at english. so I'm begging your understanding. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:11:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:11:17 +0000 (UTC) Subject: [Issue 10364] Mac OS 10.8 program crash In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10364 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at kyllingen.net --- Comment #2 from Lars T. Kyllingstad 2013-07-28 08:11:16 PDT --- I can not reproduce this on Linux. It would be great to get confirmation from someone else on OSX, to verify that it isn't a local issue. One thing I've noticed is that you call exit() in the parent process after a successful fork(). You should call _exit() instead, to avoid double-flushing buffers etc. This probably won't fix your problem, but it's worth a try. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:12:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:12:57 +0000 (UTC) Subject: [Issue 10580] spawnShell/pipeShell changes some environment variables (incl. PATH) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10580 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|nobody at puremagic.com |bugzilla at kyllingen.net -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:13:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:13:29 +0000 (UTC) Subject: [Issue 10364] Mac OS 10.8 program crash In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10364 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|nobody at puremagic.com |bugzilla at kyllingen.net -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:25:11 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:25:11 +0000 (UTC) Subject: [Issue 10216] Bad warning in std.process.kill In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10216 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |bugzilla at kyllingen.net AssignedTo|nobody at puremagic.com |bugzilla at kyllingen.net --- Comment #1 from Lars T. Kyllingstad 2013-07-28 08:25:09 PDT --- The "badly specified" part refers to the fact that process termination is done differently in different versions of Windows, and these differences are not specified in Microsoft's documentation. But you're right, we probably don't need that warning. Consider it gone. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:29:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:29:23 +0000 (UTC) Subject: [Issue 10464] Please add forkpty() to std.process In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10464 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|nobody at puremagic.com |bugzilla at kyllingen.net -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:31:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:31:57 +0000 (UTC) Subject: [Issue 8076] std.process shell() Windows In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=8076 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at kyllingen.net Resolution| |WONTFIX --- Comment #3 from Lars T. Kyllingstad 2013-07-28 08:31:57 PDT --- shell() will be deprecated. Please use one of the new functions (executeShell, pipeShell or spawnShell) instead. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:37:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:37:04 +0000 (UTC) Subject: [Issue 10364] Mac OS 10.8 program crash In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10364 --- Comment #3 from Gary Willoughby 2013-07-28 08:37:03 PDT --- (In reply to comment #2) > I can not reproduce this on Linux. It would be great to get confirmation from > someone else on OSX, to verify that it isn't a local issue. > > One thing I've noticed is that you call exit() in the parent process after a > successful fork(). You should call _exit() instead, to avoid double-flushing > buffers etc. This probably won't fix your problem, but it's worth a try. I've reduced it to this: import std.stdio; import std.string; import std.process; extern (C) { int daemon(int nochdir, int noclose); } void main(string[] args) { daemon(0, 0); auto logFile = File("/Users/gary/Desktop/test.log", "a"); logFile.writeln("Opened file"); string command = format("logger -t %s %s", "Hello", "This is a test."); executeShell(command); // Crash dump logged at /var/log/system.log logFile.writeln("Done!"); // Never executes. } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 08:59:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 15:59:26 +0000 (UTC) Subject: [Issue 10348] isRooted is either wrong or poorly specified In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10348 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |bugzilla at kyllingen.net AssignedTo|nobody at puremagic.com |bugzilla at kyllingen.net --- Comment #2 from Lars T. Kyllingstad 2013-07-28 08:59:24 PDT --- Surely \ is a valid path on Windows. Just open cmd.exe and run dir \ and it will list the files in the root directory of the current drive. I agree that absoluteDir(`\`) returns a wrong result. It should probably return rootName(base) instead. I'll take care of it. Whether isRooted(`\`) should be true or false is just a matter of definition. `\` refers to the *root directory* of the current drive, so it made sense to me to define it as true. Redefining it now would be a breaking change. If you think it is worth it, it should at least be brought up for community discussion first. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 09:43:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 16:43:38 +0000 (UTC) Subject: [Issue 10725] DMD can't output Hangul(Korean alphbet) (codepage 949(hangul)) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10725 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #2 from monarchdodra at gmail.com 2013-07-28 09:43:36 PDT --- (In reply to comment #0) > //I compiled this code > > import std.stdio; > > int main() > { > write("d??"); //'d??' means d language > > return 0; > } > > //this code outputs 'd???'(codepage 949) > //but it outputs when codepage 65001 nomally > > //I'm not good at english. so I'm begging your understanding. Are you on windows? The problem is with the *terminal*, that interprets the output using codepage 949, when it should be using 65001. You can change the code page with: chcp 65001 Use "Lucida Console" to properly display the characters. *Should* work (I think) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 09:56:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 16:56:37 +0000 (UTC) Subject: [Issue 10347] buildPath returns relative path when joining absolute with relative path In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10347 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |bugzilla at kyllingen.net AssignedTo|nobody at puremagic.com |bugzilla at kyllingen.net --- Comment #1 from Lars T. Kyllingstad 2013-07-28 09:56:36 PDT --- I have an improved implementation of buildPath() in the works. I'll ensure it behaves correctly for this case. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 10:19:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 17:19:07 +0000 (UTC) Subject: [Issue 6829] Unsigned rotate standard function in Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6829 --- Comment #40 from bearophile_hugs at eml.cc 2013-07-28 10:19:00 PDT --- (In reply to comment #13) > (Perhaps here there's material for a small enhancement request for LLVM.) Here it is, in the LLVM Bugzilla: http://llvm.org/bugs/show_bug.cgi?id=16726 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 12:28:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 19:28:29 +0000 (UTC) Subject: [Issue 9710] Pointer enums crash dmd In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9710 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull CC| |henning at still-hidden.de --- Comment #4 from Henning Pohl 2013-07-28 12:28:25 PDT --- https://github.com/D-Programming-Language/dmd/pull/2400 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 13:24:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 20:24:19 +0000 (UTC) Subject: [Issue 10348] isRooted is either wrong or poorly specified In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10348 --- Comment #3 from Andrej Mitrovic 2013-07-28 13:24:17 PDT --- (In reply to comment #2) > I agree that absoluteDir(`\`) returns a wrong result. It should probably > return rootName(base) instead. I'll take care of it. .net seems to return the drive path, e.g.: ----- using System; using System.IO; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string path1 = "\\"; string fullPath; fullPath = Path.GetFullPath(path1); Console.WriteLine("GetFullPath('{0}') returns '{1}'", path1, fullPath); } } } ----- Prints: GetFullPath('\') returns 'c:\' So I guess only 'absolutePath' needs to be fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 14:14:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 21:14:46 +0000 (UTC) Subject: [Issue 9653] Wrong implicit cast allowed with inheritance In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9653 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-28 14:14:44 PDT --- Reduced: class C { inout(TypeInfo) foo() pure inout { return typeid(Object); } } The problem is that by using typeid(Object) you can get access to a global class instance (TypeInfo) in a pure function. And the result of pure functions can be casted to be inout. But in this case you didn't create the class instance by yourself. So only self-created TypeInfo-instances should be allowed to get casted. These are hard to detect though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 14:46:05 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 21:46:05 +0000 (UTC) Subject: [Issue 10216] Bad warning in std.process.kill In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10216 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-28 14:46:02 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/690bb868edb82ac30d9a2b5590033230d2fe1388 Fix Issue 10216 - Bad warning in std.process.kill https://github.com/D-Programming-Language/phobos/commit/46419713a1a219fc03b6d40cb5cf23a4cf404aa8 Merge pull request #1438 from kyllingstad/kill-warning Fix Issue 10216 - Bad warning in std.process.kill -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 15:11:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 22:11:21 +0000 (UTC) Subject: [Issue 10216] Bad warning in std.process.kill In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10216 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 16:15:10 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 23:15:10 +0000 (UTC) Subject: [Issue 7077] mixin statements can invade the enclosing scope In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7077 hsteoh at quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh at quickfur.ath.cx --- Comment #1 from hsteoh at quickfur.ath.cx 2013-07-28 16:15:08 PDT --- I thought the whole point of mixins is to insert declarations into the enclosing scope? Otherwise it would break mixins that insert, e.g., member declarations into classes. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 16:47:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 23:47:40 +0000 (UTC) Subject: [Issue 10724] Allow slice of string literal to convert to const(char)* In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-28 16:47:38 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a878588c71ea51e2365cd595dc38413700cc3d8a Fix Issue 10724 - Allow slice of string literal to convert to const(char)* https://github.com/D-Programming-Language/dmd/commit/e230276ee0703a3cdf92e16e1b9f388be44e9c54 Merge pull request #2392 from yebblies/issue10724 [DDMD] Fix Issue 10724 - Allow slice of string literal to convert to const(char)* -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 16:48:01 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 23:48:01 +0000 (UTC) Subject: [Issue 10724] Allow slice of string literal to convert to const(char)* In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 16:52:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 23:52:21 +0000 (UTC) Subject: [Issue 9710] Pointer enums crash dmd In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9710 --- Comment #5 from github-bugzilla at puremagic.com 2013-07-28 16:52:19 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0da20b2a26aac4ce086f90f3a0441479785fb741 fix issue 9710 - Pointer enums crash dmd https://github.com/D-Programming-Language/dmd/commit/f4c79c69fe4196b83ceb3ef10d56670a52291c0e Merge pull request #2400 from hpohl/9710 fix issue 9710 - Pointer enums crash dmd -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Sun Jul 28 16:52:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 28 Jul 2013 23:52:33 +0000 (UTC) Subject: [Issue 9710] Pointer enums crash dmd In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9710 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 02:16:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 09:16:38 +0000 (UTC) Subject: [Issue 7077] mixin statements can invade the enclosing scope In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7077 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |yebblies at gmail.com --- Comment #2 from yebblies 2013-07-29 19:16:31 EST --- Nah, `mixin("X")` should behave as close as possible to `X`, and here it is being injected into the wrong scope. The bug is actually IfStatement not creating a proper scope for the if-body. https://github.com/D-Programming-Language/dmd/pull/2402 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 04:17:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 11:17:07 +0000 (UTC) Subject: [Issue 6646] [SafeD] array.reserve is not @safe/trusted In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6646 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |monarchdodra at gmail.com Resolution|FIXED | --- Comment #5 from monarchdodra at gmail.com 2013-07-29 04:17:04 PDT --- I think this change is wrong. reserve can call postblit, wich may end up being unsafe (or throwing). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 04:43:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 11:43:20 +0000 (UTC) Subject: [Issue 7077] mixin statements can invade the enclosing scope In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7077 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-29 04:43:18 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1b3b8611661dd86190dca151bc8106fc694c3ac1 Fix Issue 7077 - mixin statements can invade the enclosing scope The if body should always be inside its own scope https://github.com/D-Programming-Language/dmd/commit/f1c47fbbb2688888d1c4f001d8d338a885704bfe Merge pull request #2402 from yebblies/issue7077 Fix Issue 7077 - mixin statements can invade the enclosing scope -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 04:46:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 11:46:33 +0000 (UTC) Subject: [Issue 7077] (D1 only) mixin statements can invade the enclosing scope In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=7077 yebblies changed: What |Removed |Added ---------------------------------------------------------------------------- Version|D2 |D1 Summary|mixin statements can invade |(D1 only) mixin statements |the enclosing scope |can invade the enclosing | |scope --- Comment #4 from yebblies 2013-07-29 21:46:32 EST --- Still exists in D1 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 05:01:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 12:01:28 +0000 (UTC) Subject: [Issue 10726] New: Bogus Circular Reference error if opEquals defined and has a loop Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10726 Summary: Bogus Circular Reference error if opEquals defined and has a loop Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: puneet at coverify.org --- Comment #0 from Puneet Goel 2013-07-29 05:01:25 PDT --- $ git show commit 4db28ef01443e3e649fe79824889c0ec620f6e72 Merge: a218f47 b2d2bd9 Author: Walter Bright Date: Mon Jul 29 00:33:34 2013 -0700 Merge pull request #2395 from yebblies/strvararg [DDMD] Do not pass strings to C varargs functions Here is the reduced test case. I am getting the following error: $ dmd test.d test.d(19): Error: circular reference to 'test.Once._bar' test.d(22): Error: template instance test.CirBuff!(Bar) error instantiating test.d(15): instantiated from here: Foo!(Bar) test.d(15): Error: template instance test.Foo!(Bar) error instantiating Error disappears if I comment out for loop (lines 08-10) inside the opEquals method. Also disappears if I change the name of the opEquals method to say foobar. Also disappears if I do not use the isVirtualMethod trait on line 29. // test.d public struct CirBuff(T) { // 01 private T[] data; // 02 private size_t head = 0; // 03 private size_t size = 0; // 04 public size_t length() const {return size;} // 05 public bool opEquals(CirBuff!T d) @trusted { // 06 if(length != d.length) return false; // 07 for(size_t i=0; i!=size; ++i) // 08 if(this.data[(this.head+i)%this.data.length] != // 09 d.data[(d.head+i)%d.data.length]) return false; // 10 return true; // 11 } // 12 } // 13 class Once { // 14 Foo!Bar _bar; // 15 } // 16 class Bar { // 17 static Once _once; // 18 mixin(sync!(Once, "_once")); // 19 } // 20 class Foo (T=int) { // 21 CirBuff!T _buff; // 22 } // 23 template sync(T, string U="this", size_t ITER=0) { // 24 static if(ITER == __traits(derivedMembers, T).length) enum sync = ""; // 25 else { // 26 enum string mem = __traits(derivedMembers, T)[ITER]; // 27 enum string sync = // 28 "static if(! __traits(isVirtualMethod, " ~ U ~ "." ~ mem ~ ")) { }" // 29 ~ sync!(T, U, ITER+1); // 30 } // 31 } // 32 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 06:29:41 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 13:29:41 +0000 (UTC) Subject: [Issue 10727] New: Regression (dmd-2.061) -- DMD dumps core Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10727 Summary: Regression (dmd-2.061) -- DMD dumps core Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: puneet at coverify.org --- Comment #0 from Puneet Goel 2013-07-29 06:29:40 PDT --- This regression got introduced in dmd-2.061 (works with dmd-2.060). $ dmd test.d dmd: glue.c:1227: virtual unsigned int Type::totym(): Assertion `0' failed. Aborted (core dumped) $ cat test.d import foo; $ cat foo.d struct CirBuff(T) { import std.traits: isArray; CirBuff!T opAssign(R)(R ) if(isArray!R) { } struct Range(U,S) { Range!(U,S) save() {return U;} } T[] toArray() { T[] ret = new T[this.length]; return ret; } alias toArray this; Range!(T, T) range() {} } class Bar (T=int){ CirBuff!T _bar; } class Once { Bar!Foo _foobar; } class Foo: Frop {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 06:34:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 13:34:03 +0000 (UTC) Subject: [Issue 10727] Regression (dmd-2.061) -- DMD dumps core In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10727 --- Comment #1 from Puneet Goel 2013-07-29 06:34:02 PDT --- Another interesting testcase. Class Frop is not defined, but DMD fails to catch that. dmd-2.060 works fine. $ dmd -c test.d # compiles without errors $ ~/local/dmd-2.060/dmd2/linux/bin64/dmd -c test.d foo.d(22): Error: undefined identifier Frop $ cat test.d import foo; $ cat foo.d struct CirBuff(T) { import std.traits: isArray; CirBuff!T opAssign(R)(R ) if(isArray!R) { } T[] toArray() { T[] ret = new T[this.length]; return ret; } alias toArray this; } class Bar (T=int){ CirBuff!T _bar; } class Once { Bar!Foo _foobar; } class Foo: Frop {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 06:52:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 13:52:25 +0000 (UTC) Subject: [Issue 10720] ICE with is(aaOfNonCopyableStruct.nonExistingField) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10720 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de --- Comment #1 from Henning Pohl 2013-07-29 06:52:24 PDT --- https://github.com/D-Programming-Language/dmd/pull/2409 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 08:31:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 15:31:03 +0000 (UTC) Subject: [Issue 10601] std.path.setExtension leaves trailing dot if extension is empty In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10601 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-29 08:30:58 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e43433f56682e8964596fbff5a9ea8b1fc32f927 Fix issue 10601. If extension is empty, std.path.setExtension should be equivalent to std.path.stripExtension. This special case is useful in generic code that needs to alternate between, e.g., .exe on Windows and no executable extension on Posix. https://github.com/D-Programming-Language/phobos/commit/f2bd29cb97033ae041ebfd32690f01ddb25b98b7 Merge pull request #1409 from quickfur/issue10601 Fix issue 10601. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 08:32:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 15:32:54 +0000 (UTC) Subject: [Issue 10601] std.path.setExtension leaves trailing dot if extension is empty In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10601 Lars T. Kyllingstad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at kyllingen.net Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 08:40:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 15:40:55 +0000 (UTC) Subject: [Issue 10724] Allow slice of string literal to convert to const(char)* In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #5 from Andrej Mitrovic 2013-07-29 08:40:53 PDT --- Just to clarify: const(char)* a = "abc"; const(char)* b = "abc"[0..$-1]; Do a and b end up pointing to different memory addresses? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 08:43:29 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 15:43:29 +0000 (UTC) Subject: [Issue 10724] Allow slice of string literal to convert to const(char)* In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10724 --- Comment #6 from yebblies 2013-07-30 01:43:28 EST --- (In reply to comment #5) > Just to clarify: > > const(char)* a = "abc"; > const(char)* b = "abc"[0..$-1]; > > Do a and b end up pointing to different memory addresses? Yes. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 09:12:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 16:12:33 +0000 (UTC) Subject: [Issue 6646] [SafeD] array.reserve is not @safe/trusted In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6646 --- Comment #6 from hsteoh at quickfur.ath.cx 2013-07-29 09:12:32 PDT --- Hmph. I wish there was a consistent way of propagating attributes, or saying "function X's purity depends on argument Y" or something along those lines. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 09:16:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 16:16:46 +0000 (UTC) Subject: [Issue 4085] Steps toward a static foreach In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4085 --- Comment #9 from monarchdodra at gmail.com 2013-07-29 09:16:44 PDT --- https://github.com/D-Programming-Language/phobos/pull/1440 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 10:10:33 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 17:10:33 +0000 (UTC) Subject: [Issue 10728] New: A combination of implicit conversion and lambda call cannot be compiled Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10728 Summary: A combination of implicit conversion and lambda call cannot be compiled Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: ttanjo at gmail.com --- Comment #0 from Tomoya Tanjo 2013-07-29 10:10:32 PDT --- In the following code, function foo cannot be compiled but it should. --- foo.d string foo(char[] s) // It cannot be compiled { return s ? (){ return s[0..$].dup; }() : null; } string bar(char[] s) // It can be compiled { return s ? s[0..$].dup : null; } --- Output: $ dmd -main -run foo.d foo.d(3): Error: cannot implicitly convert expression (s ? delegate char[]() { return _adDupT(& _D11TypeInfo_Aa6__initZ, s[0LU..__dollar]); } () : null) of type char[] to string -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 10:12:57 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 17:12:57 +0000 (UTC) Subject: [Issue 10728] A combination of implicit conversion and lambda call cannot be compiled In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10728 --- Comment #1 from Tomoya Tanjo 2013-07-29 10:12:57 PDT --- It is reproduced by dmd v2.064-devel-f1c47fb on Linux 64bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 12:52:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 19:52:18 +0000 (UTC) Subject: [Issue 2407] function pointer as an enum's base type doesn't work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=2407 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |henning at still-hidden.de Summary|function pointer as an |function pointer as an |enum's base type doesn't |enum's base type doesn't |work |work --- Comment #1 from Henning Pohl 2013-07-29 12:52:16 PDT --- https://github.com/D-Programming-Language/dmd/pull/2418 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 14:02:25 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 21:02:25 +0000 (UTC) Subject: [Issue 9859] Cannot use inout in delegate In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9859 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-29 14:02:22 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/95830234837da368f19be6ac4ed0ae2538ea2ecd fix issue 9859 - Cannot use inout in delegate https://github.com/D-Programming-Language/dmd/commit/874036c5847a8cd7ea84d3d74d5281a75fea90e2 Merge pull request #2399 from hpohl/9859 fix issue 9859 - Cannot use inout in delegate -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 14:02:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 21:02:32 +0000 (UTC) Subject: [Issue 9859] Cannot use inout in delegate In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9859 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla at digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 14:10:30 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 21:10:30 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 Dicebot changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |public at dicebot.lv --- Comment #4 from Dicebot 2013-07-29 14:10:28 PDT --- Problem does not exist on Arch Linux as it does not use .zip and uses git tag instead. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 16:41:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 29 Jul 2013 23:41:19 +0000 (UTC) Subject: [Issue 658] struct pointers in with() In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=658 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid CC| |henning at still-hidden.de --- Comment #2 from Henning Pohl 2013-07-29 16:41:16 PDT --- https://github.com/D-Programming-Language/dmd/pull/2419 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 19:30:35 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 02:30:35 +0000 (UTC) Subject: [Issue 10339] ICE when __MODULE__ token is found but module declaration is missing In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10339 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #3 from Kenji Hara 2013-07-29 19:30:32 PDT --- *** This issue has been marked as a duplicate of issue 10695 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 19:30:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 02:30:37 +0000 (UTC) Subject: [Issue 10695] __MODULE__ in string mixin crashes compiler In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10695 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mk at krej.cz --- Comment #4 from Kenji Hara 2013-07-29 19:30:32 PDT --- *** Issue 10339 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: ------- From d-bugmail at puremagic.com Mon Jul 29 19:31:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 02:31:56 +0000 (UTC) Subject: [Issue 10720] ICE with is(aaOfNonCopyableStruct.nonExistingField) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10720 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Component|DMD |druntime --- Comment #2 from Kenji Hara 2013-07-29 19:31:55 PDT --- I think this is rather druntime issue. https://github.com/D-Programming-Language/druntime/pull/554 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 19:47:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 02:47:38 +0000 (UTC) Subject: [Issue 10017] Can not assign to a Variant another Variant holding a bigger structure In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10017 sumitraja at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sumitraja at gmail.com --- Comment #12 from sumitraja at gmail.com 2013-07-29 19:47:30 PDT --- (In reply to comment #11) > (In reply to comment #10) > > (In reply to comment #8) > > > (In reply to comment #7) > > > > You are right, sorry for the confusion. > > > > > > It should have been merged into 2.063 though because bug 9122 was marked as > > > regression. > > > > Ok. I pushed the fix to 2.063 branch. > > Looks like the fix isn't in the 2.063 release binaries. At least not the Linux > 64-bit ones. Doesn't seem to be in the Windows 32-bit 2.063 release binaries either. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 20:55:26 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 03:55:26 +0000 (UTC) Subject: [Issue 10727] Regression (dmd-2.061) -- DMD dumps core In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10727 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull --- Comment #2 from Kenji Hara 2013-07-29 20:55:24 PDT --- https://github.com/D-Programming-Language/dmd/pull/2420 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Mon Jul 29 21:42:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 04:42:55 +0000 (UTC) Subject: [Issue 10727] Regression (dmd-2.061) -- DMD dumps core In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10727 --- Comment #3 from Puneet Goel 2013-07-29 21:42:54 PDT --- (In reply to comment #2) > https://github.com/D-Programming-Language/dmd/pull/2420 Another testcase (after pulling in the pull request). DMD does not crib about missing override for function Foo.frop. But starts doing that if "alias toArray this" in CirBuff(T) is commented out. struct CirBuff(T) { import std.traits: isArray; CirBuff!T opAssign(R)(R ) if(isArray!R) { } T[] toArray() { T[] ret; // = new T[this.length]; return ret; } alias toArray this; } class Bar (T=int){ CirBuff!T _bar; } class Once { Bar!Foo _foobar; } class Foo: Frop { // override public int frop() {return 1;} } class Frop { public int frop() {return 0;} } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 00:09:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 07:09:00 +0000 (UTC) Subject: [Issue 4481] ICE(glue.c, !vthis->csym) or compiles, depending on the import statements order In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4481 --- Comment #13 from kekeniro2 at yahoo.co.jp 2013-07-30 00:08:55 PDT --- Here is another variant of this. [DMD2.063.2] dmd crasha.d crashb.d ===> Assertion failure: '!vthis->csym' on line 783 in file 'glue.c' // crasha.d --------------------- import std.algorithm; // crashb.d --------------------- import std.algorithm; class SomeClass { void foo() { //enum myFilter = function(int s)=>true; // OK auto myFilter = function(int s)=>true; // NG int[] r; r.filter!myFilter(); } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 05:50:38 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 12:50:38 +0000 (UTC) Subject: [Issue 5224] std.algorithm.remove!(SwapStrategy.unstable) doesn't work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5224 --- Comment #6 from github-bugzilla at puremagic.com 2013-07-30 05:50:34 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/98b47ad5dd882e593b630dc345087914f88fa570 issue 5224 https://github.com/D-Programming-Language/phobos/commit/dcd065e2e56fc769e5a5b209910674229c6a0e17 Merge pull request #1162 from andralex/5224 Fix Issue 5224 - std.algorithm.remove!(SwapStrategy.unstable) doesn't work -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 05:50:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 12:50:45 +0000 (UTC) Subject: [Issue 5224] std.algorithm.remove!(SwapStrategy.unstable) doesn't work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=5224 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED CC| |andrej.mitrovich at gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 09:56:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 16:56:00 +0000 (UTC) Subject: [Issue 10729] New: Some exception symbols undefined Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10729 Summary: Some exception symbols undefined Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: critical Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: andre at lc.vlsm.org --- Comment #0 from Andre Tampubolon 2013-07-30 09:55:57 PDT --- Created an attachment (id=1239) A simple "hello world" code As usual, I updated dmd, druntime, and phobos to the latest git version. Then I tried to build a hello world code (as attached). I got these errors: C:\Users\CSL-NB-064\Codes\D>dmd hello.d OPTLINK (R) for Win32 Release 8.00.5 Copyright (C) Digital Mars 1989-2009 All rights reserved. http://www.digitalmars.com/ctg/optlink.html hello.obj(hello) Error 42: Symbol Undefined _D3std4conv21ConvOverflowException6__ctorMFNaNbNfAyaAyakZC3std4conv21ConvOverflowException hello.obj(hello) Error 42: Symbol Undefined _D3std4conv13ConvException6__ctorMFNaNbNfAyaAyakZC3std4conv13ConvException hello.obj(hello) Error 42: Symbol Undefined _D3std6format15FormatException6__ctorMFNaNbNfAyaAyakC6object9ThrowableZC3std6format15FormatE xception hello.obj(hello) Error 42: Symbol Undefined _D3std3utf12UTFException6__ctorMFNaNfAyakAyakC6object9ThrowableZC3std3utf12UTFException --- errorlevel 4 I didn't use any switch, just: dmd hello.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 10:42:56 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 17:42:56 +0000 (UTC) Subject: [Issue 10730] New: ByLine description "ditto" Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10730 Summary: ByLine description "ditto" Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: websites AssignedTo: nobody at puremagic.com ReportedBy: peter.alexander.au at gmail.com --- Comment #0 from Peter Alexander 2013-07-30 10:42:54 PDT --- http://dlang.org/phobos/std_stdio.html#.File.ByLine Description is "Range that reads one line at a time. ditto". The "ditto" should not be there. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 10:43:34 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 17:43:34 +0000 (UTC) Subject: [Issue 10731] New: byLine description incorrect Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10731 Summary: byLine description incorrect Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: websites AssignedTo: nobody at puremagic.com ReportedBy: peter.alexander.au at gmail.com --- Comment #0 from Peter Alexander 2013-07-30 10:43:34 PDT --- http://dlang.org/phobos/std_stdio.html#.File.byLine Description is "Convenience function that returns the LinesReader corresponding to this file." It doesn't return a LinesReader, it returns a ByLine. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 10:56:48 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 17:56:48 +0000 (UTC) Subject: [Issue 10730] ByLine description "ditto" In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10730 Brad Anderson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eco at gnuk.net --- Comment #1 from Brad Anderson 2013-07-30 10:56:47 PDT --- Already fixed in master. https://github.com/D-Programming-Language/phobos/commit/4c713c311ddb7601aad3b04430f38c26dd256119#std/stdio.d Just hasn't made it onto the live site yet. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 11:03:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 18:03:51 +0000 (UTC) Subject: [Issue 10731] byLine description incorrect In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10731 Brad Anderson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eco at gnuk.net --- Comment #1 from Brad Anderson 2013-07-30 11:03:50 PDT --- This has also been fixed in master with a brand spanking new and improved description. https://github.com/D-Programming-Language/phobos/blob/master/std/stdio.d#L1124 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 11:55:53 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 18:55:53 +0000 (UTC) Subject: [Issue 10347] buildPath returns relative path when joining absolute with relative path In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10347 --- Comment #2 from Lars T. Kyllingstad 2013-07-30 11:55:51 PDT --- Pull request: https://github.com/D-Programming-Language/phobos/pull/1442 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 12:46:46 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 30 Jul 2013 19:46:46 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #5 from Martin Nowak 2013-07-30 12:46:44 PDT --- libcurl4-dev is a virtual package provided by libcurl4-openssl-dev libcurl4-nss-dev libcurl4-gnutls-dev So this issue can be solved by installing replacing libcurl4-gnutls-dev with libcurl4-openssl-dev on the build machine. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 18:58:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 01:58:51 +0000 (UTC) Subject: [Issue 10732] New: Example code for std.utf.toUTFindex does not work Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10732 Summary: Example code for std.utf.toUTFindex does not work Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: k.hara.pg at gmail.com --- Comment #0 from Kenji Hara 2013-07-30 18:58:50 PDT --- As the title. import std.utf; void main() { assert(toUTFindex(`hello world`, 7) == 7); // doesn't work! assert(toUTFindex(`hello world`w, 7) == 7); assert(toUTFindex(`hello world`d, 7) == 7); assert(toUTFindex(`Ma Ch?rie`, 6) == 7); // doesn't work! assert(toUTFindex(`Ma Ch?rie`w, 7) == 7); assert(toUTFindex(`Ma Ch?rie`d, 7) == 7); assert(toUTFindex(`?????? / ????????`, 3) == 9); // doesn't work! assert(toUTFindex(`?????? / ????????`w, 9) == 9); assert(toUTFindex(`?????? / ????????`d, 9) == 9); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 19:13:37 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 02:13:37 +0000 (UTC) Subject: [Issue 10732] Example code for std.utf.toUTFindex does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10732 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara 2013-07-30 19:13:37 PDT --- https://github.com/D-Programming-Language/phobos/pull/1443 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Tue Jul 30 21:49:22 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 04:49:22 +0000 (UTC) Subject: [Issue 10727] Regression (dmd-2.061) -- DMD dumps core In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10727 --- Comment #4 from github-bugzilla at puremagic.com 2013-07-30 21:49:19 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/da18e74c9efef79446506845e6cad9da352a61d7 fix Issue 10727 - Regression (dmd-2.061) -- DMD dumps core Implicit identity assignment check introduced from 2.061 (instantiate opAssign under error gagging) had gagged undefined identifier error. https://github.com/D-Programming-Language/dmd/commit/2611985c6a9ad15f7eb76d97738d2f36ab39e767 Merge pull request #2420 from 9rnsr/fix10727 [REG2.061] Issue 10727 - DMD dumps core -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 01:02:32 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 08:02:32 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 Jordi Sayol changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |g.sayol at yahoo.es --- Comment #6 from Jordi Sayol 2013-07-31 01:02:30 PDT --- This is a known issue. On Debian, Ubuntu, etc., all curl libraries has "versioned symbols", which are not properly handled by others Linux systems like Fedora, OpenSUSE, etc., where their curl libraries do not have any versioned symbol. libphobos linked on Debian includes libcurl versioned symbols which will not work on Fedora, but libphobos linked on Fedora will work on Debian. So there are two possible solutions: - Link libphobos on a system like Fedora (libcurl without versioned symbols). - Install a non versioned symbols curl libraries on Debian, and resulting phobos library will work on almost every Linux system. I just offered Walter a personalized deb package which installs Fedora's curl libraries (non versioned symbols) on Ubuntu (until now Linux building process was done on Ubuntu). These libraries will only be used to link libphobos, and resulting libraries will works on almost all Linux systems. This deb package will NEVER be publicly offered because is NOT needed by any user. Someone knows another way to fix this? Removing the lubcurl dependency on libphobos in not an option, at least by the moment. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 01:11:55 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 08:11:55 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #7 from Jordi Sayol 2013-07-31 01:11:54 PDT --- (In reply to comment #4) > Problem does not exist on Arch Linux as it does not use .zip and uses git tag > instead. This is correct because Arch packages links its own libphobos on Arch, and don't use the libphobos from release zip archive. In other words, libphobos compiled/linked in an Specific Linux system will always work on this specific Linux system. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 01:13:50 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 08:13:50 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #8 from Jordi Sayol 2013-07-31 01:13:49 PDT --- (In reply to comment #5) > libcurl4-dev is a virtual package provided by > libcurl4-openssl-dev > libcurl4-nss-dev > libcurl4-gnutls-dev > > So this issue can be solved by installing replacing libcurl4-gnutls-dev with > libcurl4-openssl-dev on the build machine. This is not correct. All curl libraries on Debian like systems has versioned symbols, source of this problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 02:43:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 09:43:47 +0000 (UTC) Subject: [Issue 10717] std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 monarchdodra at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra at gmail.com --- Comment #5 from monarchdodra at gmail.com 2013-07-31 02:43:39 PDT --- (In reply to comment #4) > (In reply to comment #3) > > https://github.com/D-Programming-Language/phobos/pull/1436 > > Thank you again Jonathan :-) The new semantics are: //---- If $(D c) is an uppercase ASCII character, then its corresponding lowercase letter is returned. Otherwise, $(D c) is returned. $(D C) can be any type which implicitly converts to $(D dchar). In the case where it's a built-in type, $(D Unqual!C) is returned, whereas if it's a user-defined type, $(D dchar) is returned. //---- Does this fit the bill, or do you see anything else that needs to be addressed? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 05:15:59 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 12:15:59 +0000 (UTC) Subject: [Issue 10717] std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 --- Comment #6 from bearophile_hugs at eml.cc 2013-07-31 05:15:58 PDT --- (In reply to comment #5) > Does this fit the bill, or do you see anything else that needs to be addressed? I have tried it, and the semantics seems OK. But the implementation is: auto toLower(C)(C c) if(is(C : dchar)) { static if(isScalarType!C) return isUpper(c) ? cast(Unqual!C)(c + 'a' - 'A') : cast(Unqual!C)c; else return toLower!dchar(c); } So a call to toLower can cause two function calls. toLower() is a tiny function that could be called many many times, so perhaps in debug mode (without inlining) doubling the number of function calls slows down the user code a bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 05:44:08 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 12:44:08 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #9 from Dicebot 2013-07-31 05:44:06 PDT --- (In reply to comment #7) This is correct because Arch packages links its own libphobos on Arch, and > don't use the libphobos from release zip archive. > > In other words, libphobos compiled/linked in an Specific Linux system will > always work on this specific Linux system. That is exactly what I have meant. Why do we insist on using the same .zip archive built on Debian-like system everywhere? Native packaging does avoid this problem and scales much better. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 05:49:44 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 12:49:44 +0000 (UTC) Subject: [Issue 9426] [enh] polymorphic lambda should be aliasable In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=9426 bearophile_hugs at eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs at eml.cc --- Comment #3 from bearophile_hugs at eml.cc 2013-07-31 05:49:42 PDT --- Now the D language supports enum and alias used as lambdas, so adding template function lambdas seems good: import std.typecons: Tuple; void main() { alias Pair(T) = Tuple!(T, T); // OK auto p = Pair!int(10, 20); enum isGood(T) = is(T == int) || is(T == long); // OK static assert(isGood!int); enum foo(T) = (T x) => x * x; // OK static assert(foo!int(5) == 25); alias bar = x => x * x; // Error } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 06:06:18 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 13:06:18 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #10 from Jordi Sayol 2013-07-31 06:06:17 PDT --- (In reply to comment #9) > (In reply to comment #7) > This is correct because Arch packages links its own libphobos on Arch, and > > don't use the libphobos from release zip archive. > > > > In other words, libphobos compiled/linked in an Specific Linux system will > > always work on this specific Linux system. > > That is exactly what I have meant. Why do we insist on using the same .zip > archive built on Debian-like system everywhere? Native packaging does avoid > this problem and scales much better. We have used the same zip until now with great results. I prefer to have one single libphobos library that properly runs on almost all Linux systems than many different ones compiled phobos libraries, dmd command, etc., but if this is not possible we have to change the way we have done until now. I don't think that this is the case however. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 06:48:03 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 13:48:03 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #11 from Martin Nowak 2013-07-31 06:48:00 PDT --- (In reply to comment #8) > This is not correct. All curl libraries on Debian like systems has versioned > symbols, source of this problem. I didn't saw any versioned symbols but maybe nm doesn't show them or I made a mistake. > We have used the same zip until now with great results. I prefer to have one > single libphobos library that properly runs on almost all Linux systems than > many different ones compiled phobos libraries, dmd command, etc., but if this > is not possible we have to change the way we have done until now. I don't think > that this is the case however. So what do you suggest then, building libcurl from source? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 07:01:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 14:01:45 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #12 from Dicebot 2013-07-31 07:01:44 PDT --- Also, is there any usage info for .zip archive on Linux platforms? In other words, is it actually worth any considerable efforts? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 08:59:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 15:59:52 +0000 (UTC) Subject: [Issue 10733] New: Add a druntime function to find the pointer to a key of a built-in associative array given the pointer to a value Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10733 Summary: Add a druntime function to find the pointer to a key of a built-in associative array given the pointer to a value Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: druntime AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-31 08:59:51 PDT --- Associative arrays are handy, but beside sets and bags there's a common desire for ordered dictionaries. They are not ordered in the sense an AVL is ordered, it's not the order of the keys that matters for them, but the insertion order of the key-value pairs. So they are hash-based, unlike a search tree. The Python standard library has such data structure: http://docs.python.org/2/library/collections.html#collections.OrderedDict An OrderedDict has some of the advantages of an array (it keeps the insertion order, its printing and its iteration is deterministic, it can be iterated backwards too), and it can have a popLast or popHead member function. There are several ways to implement an OrderedDict in library code. One of the simplest is to wrap a built-in D hash based associative array. Let's say the implementation is like: final class OrderedAA(KeyType, ValType) { static struct MyValue { ValType item; typeof(this)* pred, succ; } private MyValue[KeyType] data; ... } Each value is a struct that beside the original value 'item' also contains a pointer to the precedent and successive MV, in a circular doubly linked list. The member functions of OrderedAA that add or remove items from the associative array manage the linked list of values. The iteration is a range that follows the linked list. But this way you only scan the values. To also implement byKey or to scan the keys in a foreach, or the key-value pairs, you find the pointer to the key given the pointer to a value MyValue. There a way to find the pointer to an AA key given the pointer to its value, but it's not portable and it's undocumented. So perhaps it's worth adding to the standard object module of druntime a portable way to find that pointer, to allow a simple library-based implementation of a hash-based ordered associative array. Such function must work in O(1), it's meant only for access the key in read mode, and it's probably short and simple to write. The disadvantage it that such function works on the inner representation of the D associative arrays, so it can potentially constraint future implementations of such associative arrays. But it's not easy to invent AA implementations that make it hard to implement that function in O(1). Alternative or better solutions/ideas are welcome. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 09:00:58 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 16:00:58 +0000 (UTC) Subject: [Issue 10710] shared phobos library doesn't work on all linux distributions In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10710 --- Comment #13 from Jordi Sayol 2013-07-31 09:00:56 PDT --- (In reply to comment #11) > (In reply to comment #8) > > This is not correct. All curl libraries on Debian like systems has versioned > > symbols, source of this problem. > > I didn't saw any versioned symbols but maybe nm doesn't show them or I made a > mistake. The command: $ objdump -x libphobos2.so.0.64.0 | grep curl_easy returns different symbols depending on which development curl library is installed when linked: with "libcurl4-openssl-dev": 0000000000000000 F *UND* 0000000000000000 curl_easy_cleanup@@CURL_OPENSSL_3 0000000000000000 F *UND* 0000000000000000 curl_easy_strerror@@CURL_OPENSSL_3 0000000000000000 F *UND* 0000000000000000 curl_easy_setopt@@CURL_OPENSSL_3 0000000000000000 F *UND* 0000000000000000 curl_easy_duphandle@@CURL_OPENSSL_3 0000000000000000 F *UND* 0000000000000000 curl_easy_init@@CURL_OPENSSL_3 0000000000000000 F *UND* 0000000000000000 curl_easy_pause@@CURL_OPENSSL_3 0000000000000000 F *UND* 0000000000000000 curl_easy_perform@@CURL_OPENSSL_3 With "libcurl4-gnutls-dev": 0000000000000000 F *UND* 0000000000000000 curl_easy_setopt@@CURL_GNUTLS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_strerror@@CURL_GNUTLS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_init@@CURL_GNUTLS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_cleanup@@CURL_GNUTLS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_duphandle@@CURL_GNUTLS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_perform@@CURL_GNUTLS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_pause@@CURL_GNUTLS_3 With "libcurl4-nss-dev": 0000000000000000 F *UND* 0000000000000000 curl_easy_perform@@CURL_NSS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_duphandle@@CURL_NSS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_pause@@CURL_NSS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_setopt@@CURL_NSS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_cleanup@@CURL_NSS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_strerror@@CURL_NSS_3 0000000000000000 F *UND* 0000000000000000 curl_easy_init@@CURL_NSS_3 And with Fedora curl development library: 0000000000000000 F *UND* 0000000000000000 curl_easy_setopt 0000000000000000 F *UND* 0000000000000000 curl_easy_init 0000000000000000 F *UND* 0000000000000000 curl_easy_pause 0000000000000000 F *UND* 0000000000000000 curl_easy_duphandle 0000000000000000 F *UND* 0000000000000000 curl_easy_perform 0000000000000000 F *UND* 0000000000000000 curl_easy_cleanup 0000000000000000 F *UND* 0000000000000000 curl_easy_strerror > > > We have used the same zip until now with great results. I prefer to have one > > single libphobos library that properly runs on almost all Linux systems than > > many different ones compiled phobos libraries, dmd command, etc., but if this > > is not possible we have to change the way we have done until now. I don't think > > that this is the case however. > > So what do you suggest then, building libcurl from source? As I said, I suggest two solutions: - Compile/link libphobos on system where libcurl has not versioned symbols, like Fedora. - Compile/link into Ubuntu with a libcurl without versioned symbols, this requires an specific package not available on default repositories. This option do not mean in any way that these libraries should be given with libphobos, this curl library is just used to properly link libphobos, even do not care if the functions in it has some bug because these libraries will never be used at run-time. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 09:53:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 16:53:23 +0000 (UTC) Subject: [Issue 10734] New: Assertion failure: '0' on line 1546 in file 'cast.c' Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10734 Summary: Assertion failure: '0' on line 1546 in file 'cast.c' Product: D Version: D2 Platform: All OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: zan77137 at nifty.com --- Comment #0 from SHOO 2013-07-31 09:53:05 PDT --- This code doesn't work: -------------- extern (Windows) { export uint DefWindowProcA(void*, uint, uint, ptrdiff_t); alias uint function (void*, uint, uint, ptrdiff_t) WNDPROC; } void main() { WNDPROC lpfnWndProc = &DefWindowProcA; } -------------- RESULT: $ dmd -run main Assertion failure: '0' on line 1546 in file 'cast.c' abnormal program termination -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 10:42:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 17:42:20 +0000 (UTC) Subject: [Issue 10348] isRooted is either wrong or poorly specified In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10348 --- Comment #4 from Lars T. Kyllingstad 2013-07-31 10:42:18 PDT --- Pull request 1442 coincidentally fixes this bug. https://github.com/D-Programming-Language/phobos/pull/1442 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 12:27:00 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 19:27:00 +0000 (UTC) Subject: [Issue 10717] std.ascii.toLower and toUpper should return char instead of dchar and avoid me to use a bad cast(char) In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10717 --- Comment #7 from monarchdodra at gmail.com 2013-07-31 12:26:58 PDT --- (In reply to comment #6) > So a call to toLower can cause two function calls. toLower() is a tiny function > that could be called many many times, so perhaps in debug mode (without > inlining) doubling the number of function calls slows down the user code a bit. Well, it can cause two function calls only for user defined types, so the case should not be that common. Doing it this way means you'll only end up instanciating `toLower!dchar` for all user types. Which is also a plus. One of the implementation I had suggested was: ////-------- //Public template that only filters and changes return type auto toUpper(C)(C c) @safe pure nothrow if (is(C : dchar)) out(result) { assert(!isLower(result)); } body { alias Ret = Select!(isScalarType!C, C, dchar); return cast(Ret) toUpperImpl(c); } //Non template that does actual job. private dchar toUpperImpl(dchar c) @safe pure nothrow { return isLower(c) ? cast(dchar)(c - ('a' - 'A')) : c; } ////-------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 13:07:06 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 20:07:06 +0000 (UTC) Subject: [Issue 10735] New: Buffer overflow bug in symbol_generate() Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10735 Summary: Buffer overflow bug in symbol_generate() Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bugzilla at digitalmars.com --- Comment #0 from Walter Bright 2013-07-31 13:07:05 PDT --- More than 99999 temporaries will overflow the array. See: http://stackoverflow.com/questions/17964719/dmd-2-063-temporary-build-symbols-amount-limit -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 13:09:17 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 20:09:17 +0000 (UTC) Subject: [Issue 10735] Buffer overflow bug in symbol_generate() In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10735 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #1 from Walter Bright 2013-07-31 13:09:17 PDT --- https://github.com/D-Programming-Language/dmd/pull/2438 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 13:16:15 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 20:16:15 +0000 (UTC) Subject: [Issue 10736] New: Regression (2.064 git-head): Instantiation failure triggered by module import and module order Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10736 Summary: Regression (2.064 git-head): Instantiation failure triggered by module import and module order Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: andrej.mitrovich at gmail.com --- Comment #0 from Andrej Mitrovic 2013-07-31 13:16:15 PDT --- Three files: foo\all.d: ----- module foo.all; import foo.array; import foo.range; ----- foo\array.d: ----- module foo.array; import std.range; ----- foo\range.d: ----- module foo.range; import std.range; void main() { int[] arr = [0, 1, 2, 3]; auto x = chunks(arr, 4); // error } ----- Compile (in this exact order): $ dmd foo\all.d foo\array.d foo\range.d > C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\range.d(6543): Error: template std.range.chunks does not match any function template declaration. If you remove the import to `std.range` inside of `foo.array`, it will compile. $ dmd foo\all.d foo\array.d foo\range.d > If you instead change the compilation order so 'foo\range.d' is compiled first, then it will also compile: $ foo\range.d dmd foo\all.d foo\array.d > -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 14:11:20 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 21:11:20 +0000 (UTC) Subject: [Issue 4575] Uses of deprecated delete statement in D2 Phobos In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4575 John Colvin changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED CC| |john.loughran.colvin at gmail. | |com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 14:11:52 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 21:11:52 +0000 (UTC) Subject: [Issue 10737] New: regression:out of memory Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10737 Summary: regression:out of memory Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: thelastmammoth at gmail.com --- Comment #0 from thelastmammoth at gmail.com 2013-07-31 14:11:51 PDT --- 2.063.2: dmd -c main.d Error: out of memory 2.062: fun does not match any function template declaration ---- void main(){ fun(1);} void fun(T...)(T args,string file = __FILE__, size_t line = __LINE__){} ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 14:33:04 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 21:33:04 +0000 (UTC) Subject: [Issue 10738] New: double2 ^^ 2 and double2 ^^ 3 are missing Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10738 Summary: double2 ^^ 2 and double2 ^^ 3 are missing Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: bearophile_hugs at eml.cc --- Comment #0 from bearophile_hugs at eml.cc 2013-07-31 14:33:02 PDT --- import std.math; import core.simd: double2; void main() { double2 x; double2 y = x ^^ 2; double2 z = x ^^ 3; } Gives errors like: test.d:5: Error: template std.math.pow does not match any function template declaration .../math.d:3180: Error: template std.math.pow cannot deduce template function from argument types !()(__vector(double[2LU]),__vector(double[2LU])) Similar errors are generated by ldc2 on Windows32. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 15:04:07 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 22:04:07 +0000 (UTC) Subject: [Issue 10729] Some exception symbols undefined In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10729 Nils changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nilsbossung at googlemail.com Severity|critical |regression -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 15:08:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 22:08:40 +0000 (UTC) Subject: [Issue 4095] compiling with -op -od and using absolute paths for source files make dmd write object files anywhere In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4095 Manu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |turkeyman at gmail.com --- Comment #5 from Manu 2013-07-31 15:08:38 PDT --- This is still a problem... VisualD makes use of this extensively, which causes lots of problems. Plz can haz fix? :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 15:11:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 22:11:54 +0000 (UTC) Subject: [Issue 10735] Buffer overflow bug in symbol_generate() In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10735 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-31 15:11:54 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2449520dc401d34abc26a0109da8bb32cd48de4c fix Issue 10735 - Buffer overflow bug in symbol_generate() https://github.com/D-Programming-Language/dmd/commit/e7b87a400fb5641e15b4d3d292c2302b75655f1c Merge pull request #2438 from WalterBright/fix10735 fix Issue 10735 - Buffer overflow bug in symbol_generate() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 15:13:51 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 22:13:51 +0000 (UTC) Subject: [Issue 4095] compiling with -op -od and using absolute paths for source files make dmd write object files anywhere In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4095 Andrej Mitrovic changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich at gmail.com --- Comment #6 from Andrej Mitrovic 2013-07-31 15:13:50 PDT --- (In reply to comment #1) > Note that ldc supports the -oq switch, which is much more friendlier to build > scripts. Bug 3541 has a patch to enhance dmd with -oq. It also has a pull, but it needs more votes: https://github.com/D-Programming-Language/dmd/pull/1871 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 15:14:42 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 22:14:42 +0000 (UTC) Subject: [Issue 4095] compiling with -op -od and using absolute paths for source files make dmd write object files anywhere In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4095 --- Comment #7 from Andrej Mitrovic 2013-07-31 15:14:41 PDT --- Btw why is this tagged as only D1, doesn't it affect D2 as well? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 15:17:54 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 22:17:54 +0000 (UTC) Subject: [Issue 4095] compiling with -op -od and using absolute paths for source files make dmd write object files anywhere In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=4095 Manu changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|Other |All Version|1.057 |D1 & D2 OS/Version|Linux |All --- Comment #8 from Manu 2013-07-31 15:17:53 PDT --- I guess it's just ancient ;) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 16:01:40 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 23:01:40 +0000 (UTC) Subject: [Issue 10735] Buffer overflow bug in symbol_generate() In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10735 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 16:04:23 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 31 Jul 2013 23:04:23 +0000 (UTC) Subject: [Issue 10735] Buffer overflow bug in symbol_generate() In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10735 --- Comment #3 from github-bugzilla at puremagic.com 2013-07-31 16:04:23 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/001f3890de9be1983601cbec5af84142146fdf22 Merge pull request #2438 from WalterBright/fix10735 fix Issue 10735 - Buffer overflow bug in symbol_generate() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 17:07:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 00:07:19 +0000 (UTC) Subject: [Issue 10739] New: Struct defined by template mixin leads to order-sensitivity of declarations Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10739 Summary: Struct defined by template mixin leads to order-sensitivity of declarations Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody at puremagic.com ReportedBy: smjg at iname.com Blocks: 340 --- Comment #0 from Stewart Gordon 2013-07-31 17:07:18 PDT --- Using DMD 2.063. Not sure if this is related to bug 275 or some other. ---------- template DECLARE_HANDLE() { struct HINTERNET { int h; } } const INTERNET_INVALID_STATUS_CALLBACK = cast(INTERNET_STATUS_CALLBACK) -1; mixin DECLARE_HANDLE; alias void function(HINTERNET) INTERNET_STATUS_CALLBACK; ---------- C:\Users\Stewart\Documents\Programming\D\win32>dmd -c wininet.d wininet.d(9): Error: undefined identifier HINTERNET ---------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 17:15:45 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 00:15:45 +0000 (UTC) Subject: [Issue 10732] Example code for std.utf.toUTFindex does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10732 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-31 17:15:44 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/a5ee921f7d2f327e82316de05814ffebda89e201 fix Issue 10732 - Example code for std.utf.toUTFindex does not work -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 19:23:21 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 02:23:21 +0000 (UTC) Subject: [Issue 2407] function pointer as an enum's base type doesn't work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=2407 --- Comment #2 from github-bugzilla at puremagic.com 2013-07-31 19:23:19 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1393836e36f80dfedfdc388cb0ac6b7aed08307e fix issue 2407 - function pointer as an enum's base type doesn't work https://github.com/D-Programming-Language/dmd/commit/24042483d70805d8ffeed12046707a6b0008b9f6 Merge pull request #2418 from hpohl/2407 fix issue 2407 - function pointer as an enum's base type doesn't work -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 19:33:16 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 02:33:16 +0000 (UTC) Subject: [Issue 2407] function pointer as an enum's base type doesn't work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=2407 Henning Pohl changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 19:41:19 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 02:41:19 +0000 (UTC) Subject: [Issue 10732] Example code for std.utf.toUTFindex does not work In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10732 Kenji Hara changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 21:44:12 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 04:44:12 +0000 (UTC) Subject: [Issue 10740] New: std.concurrency send() fails with structs over 32 bytes Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=10740 Summary: std.concurrency send() fails with structs over 32 bytes Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Phobos AssignedTo: nobody at puremagic.com ReportedBy: david at eagen.com --- Comment #0 from David Eagen 2013-07-31 21:44:11 PDT --- Using 2.063.2 and 2.064-devel-333c6dd: import std.concurrency : receiveOnly, send, thisTid; import std.exception : assumeUnique; import std.variant; struct JustRight { byte[32] j; } struct TooBig { byte[33] t; } void main() { JustRight[1] jArray; TooBig[1] tArray; Variant vj = jArray[]; Variant vt = tArray[]; thisTid.send(vj); thisTid.send(vt); thisTid.send(assumeUnique(jArray[])); //thisTid.send(assumeUnique(tArray[])); // Fails to compile auto received = receiveOnly!((JustRight)[]); } If the send of tArray is commented out the compilation fails with: src/phobos/std/variant.d(558): Error: cannot modify immutable expression *p So, 32-byte structs can be sent (as arrays) using send or if you first wrap it in an Variant object. Greater than 32-byte structs can be sent ONLY if they are pre-wrapped in a Variant. The size of the data shouldn't limit it from being sent using send(). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 22:17:28 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 05:17:28 +0000 (UTC) Subject: [Issue 6495] array(file.byLine()) is a problem In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6495 --- Comment #4 from hsteoh at quickfur.ath.cx 2013-07-31 22:17:25 PDT --- I like the idea of making byLine non-transient by default, but allowing a compile-time option to make it transient when you want to optimize your code (so the user is responsible for making sure transience doesn't break his code before turning it on). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- From d-bugmail at puremagic.com Wed Jul 31 22:18:47 2013 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 1 Aug 2013 05:18:47 +0000 (UTC) Subject: [Issue 6495] array(file.byLine()) is a problem In-Reply-To: References: Message-ID: http://d.puremagic.com/issues/show_bug.cgi?id=6495 --- Comment #5 from hsteoh at quickfur.ath.cx 2013-07-31 22:18:45 PDT --- I don't like the use of a boolean flag, though. Maybe byLine!CopyBuffer() (default) vs. byLine!ReuseBuffer()? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------