[Issue 8006] Implement proper in-place-modification for properties
http://d.puremagic.com/issues/show_bug.cgi?id=8006 Jacob Carlborg changed: What|Removed |Added CC||d...@me.com --- Comment #3 from Jacob Carlborg 2013-01-24 23:42:16 PST --- Same thing if you do something like this: foo.val.x = 3; Needs to be rewritten to: auto __tmp = foo.val; __tmp.x = 3; foo.val = __tmp; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9320] Non-POD status of a struct correlated to bad inlining.
http://d.puremagic.com/issues/show_bug.cgi?id=9320 Walter Bright changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2 from Walter Bright 2013-01-24 23:13:00 PST --- This has nothing to do with inlining; the constructor call is inlined just fine. It also has nothing to do with POD status, although that does illuminate the problem. The problem is that the optimizer does copy propagation only on basic types, not on structs. It needs to do it on structs, too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8411] core.time: No easy way to check if Duration is empty
http://d.puremagic.com/issues/show_bug.cgi?id=8411 --- Comment #2 from Vladimir Panteleev 2013-01-25 09:13:59 EET --- An interval has a .empty property, though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9242] Add stack stomping code to flush out heisenbugs
http://d.puremagic.com/issues/show_bug.cgi?id=9242 --- Comment #10 from Walter Bright 2013-01-24 21:59:02 PST --- (In reply to comment #9) > (In reply to comment #8) > > > Why not try it and see what happens? > > I have just tried this code with and without -gx, What do I need to do to convince you that stack overflow has nothing at all to do with what -gx does? > and on Windows32 the program > segfaults with no error message and no stack trace: And it seg faults because the stack runs into the guard page. A stack trace would be problematic, because there'd be thousands of entries, all the same. Generally, once you run out of stack, there's not a whole lot of function calling you can do to do more processing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7159] Forward reference when casting auto return method
http://d.puremagic.com/issues/show_bug.cgi?id=7159 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Platform|Other |All Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5933] Cannot retrieve the return type of an auto-return member function
http://d.puremagic.com/issues/show_bug.cgi?id=5933 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #6 from Kenji Hara 2013-01-24 21:08:19 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/960987479e5c591c19e2a49c729c98a7f1218bd5 fix Issue 5933 - Cannot retrieve the return type of an auto-return member function https://github.com/D-Programming-Language/dmd/commit/de4f8f6bf8dc9fcc1730ea4d7f2bbd3e74880f08 Merge pull request #1543 from 9rnsr/fix5933 Issue 5933 & 7159 & 9377 - Invoke function semantic3 correctly where it is required. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9392] New: Misleading text about required OS version
http://d.puremagic.com/issues/show_bug.cgi?id=9392 Summary: Misleading text about required OS version Product: D Version: D2 Platform: All OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: installer AssignedTo: nob...@puremagic.com ReportedBy: mikez...@gmail.com --- Comment #0 from Elias Zamaria 2013-01-24 19:22:32 PST --- When I start the DMD installer, it says "This package is intended for Mac OS X Leopard (10.5) only.", even though it is supposedly made for OS X 10.7 and later. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7260] "g" on default in std.regex
http://d.puremagic.com/issues/show_bug.cgi?id=7260 bearophile_h...@eml.cc changed: What|Removed |Added Summary|"g" on default in |"g" on default in std.regex |std.regex.match | --- Comment #4 from bearophile_h...@eml.cc 2013-01-24 19:21:14 PST --- If changing std.regex.regex is not possible, then an alternative solution is to introduce the new little function "std.regex.re", that repeats on default, that is like: re(someString) === regex(someString, "g") re(someString, "d") === regex(someString, "dg") -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9391] New: Constant std.regex.regex
http://d.puremagic.com/issues/show_bug.cgi?id=9391 Summary: Constant std.regex.regex Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-01-24 18:52:04 PST --- This is a low-priority enhancement request (meta-enhancement request: in Bugzilla I'd like different tags for different enhancement request priorities). This code works: import std.stdio, std.regex; void main() { auto r = regex(r"\d+", "g"); "10 20 30".match(r).writeln(); } And prints: [["10"], ["20"], ["30"]] While this code: import std.stdio, std.regex; void main() { const r = regex(r"\d+", "g"); "10 20 30".match(r).writeln(); } Shows (dmd 2.062alpha): test.d(4): Error: template std.regex.match does not match any function template declaration. Candidates are: ...\dmd2\src\phobos\std\regex.d(6532):std.regex.match(R, RegEx)(R input, RegEx re) if (isSomeString!(R) && is(RegEx == Regex!(BasicElementOf!(R ...\dmd2\src\phobos\std\regex.d(6539):std.regex.match(R, String)(R input, String re) if (isSomeString!(R) && isSomeString!(String)) ...\dmd2\src\phobos\std\regex.d(6545):std.regex.match(R, RegEx)(R input, RegEx re) if (isSomeString!(R) && is(RegEx == StaticRegex!(BasicElementOf!(R ...\dmd2\src\phobos\std\regex.d(6532): Error: template std.regex.match cannot deduce template function from argument types !()(string,const(Regex!(char))) I suggest to support constant regex, if possible. (In D code I like to mark everything as not mutable unless it has to mutate). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9242] Add stack stomping code to flush out heisenbugs
http://d.puremagic.com/issues/show_bug.cgi?id=9242 --- Comment #9 from bearophile_h...@eml.cc 2013-01-24 18:24:04 PST --- (In reply to comment #8) > Why not try it and see what happens? I have just tried this code with and without -gx, and on Windows32 the program segfaults with no error message and no stack trace: import std.c.stdio; void recurse(in uint i=0) { printf("%u ", i); recurse(i + 1); } void main() { recurse(); } > In any case, discussing stack overflow > here is not the right place, as this issue has nothing in common with it. OK. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3603] Allow selective import syntax to import several modules from a package
http://d.puremagic.com/issues/show_bug.cgi?id=3603 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #3 from bearophile_h...@eml.cc 2013-01-24 18:17:12 PST --- I'd like to write: import std: stdio, algorithm, range, array; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9390] New: Option for verbose regular expressions
http://d.puremagic.com/issues/show_bug.cgi?id=9390 Summary: Option for verbose regular expressions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-01-24 18:14:01 PST --- I'd really like an option to write "verbose" regular expressions in D, like in Python: http://docs.python.org/2/library/re.html > re.X > re.VERBOSE > > This flag allows you to write regular expressions that look > nicer. Whitespace within the pattern is ignored, except when in a > character class or preceded by an unescaped backslash, and, when > a line contains a '#' neither in a character class or preceded by > an unescaped backslash, all characters from the leftmost such '#' > through the end of the line are ignored. > > That means that the two following regular expression objects that > match a decimal number are functionally equal: > > a = re.compile(r"""\d + # the integral part >\.# the decimal point >\d * # some fractional digits""", re.X) > b = re.compile(r"\d+\.\d*") RE code is code like every other, so it enjoys comments, a nicer indenting and formatting. Making RE more readable helps their debug and understand. In my Python code all RE longer than half a line of chars are "verbose". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4532] std.string.format, std.stream methods, etc. still use the old doFormat instead of formattedWrite
http://d.puremagic.com/issues/show_bug.cgi?id=4532 --- Comment #16 from Andrej Mitrovic 2013-01-24 16:22:09 PST --- It seems all code samples in this issue are fixed. There seems to be very few doFormat calls left in Phobos: std\stdio.d:1498: std.format.doFormat(&putc, arguments, argptr); std\stdio.d:1533: std.format.doFormat(&putcw, arguments, argptr); std\stream.d:1209: doFormat(&doFormatCallback,arguments,argptr); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7881] std.string.format does not support structs with no toString
http://d.puremagic.com/issues/show_bug.cgi?id=7881 Andrej Mitrovic changed: What|Removed |Added Resolution|DUPLICATE |WORKSFORME --- Comment #2 from Andrej Mitrovic 2013-01-24 16:19:44 PST --- I'm making as WORKSFORME instead because it's fixed, the other issue is still opened. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7675] std.format needs better exception messages
http://d.puremagic.com/issues/show_bug.cgi?id=7675 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #4 from Andrej Mitrovic 2013-01-24 16:11:25 PST --- The situation seems to be better now: import std.string; void main() { string res = format("%s %s", 1); } > std.format.FormatException@D:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\format.d(431): > Orphan format specifier: %%s %s Slightly confusing message, as it thought it was going to print '%s' but it prints the entire string. And the other message: import std.string; void main() { string res = format("%s %s", 1, 2, 3); } > std.format.FormatException@D:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\string.d(2536): > Orphan format arguments: args[2..3] I'm quite satisfied that this was implemented. Although the stack trace still sucks as I've yet to get proper line numbers. But at least I don't have to count the specifiers in a wrapper function, I just have to catch FormatExceptions: string safeFmt(string file = __FILE__, size_t line = __LINE__, Args...)(string fmt, Args args) { try { return format(fmt, args); } catch (FormatException exc) { exc.file = file; exc.line = line; throw exc; } } void main() { auto x = safeFmt("%s", 1, 2); } How great is that? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9369] DDoc hardcodes '&' -> '&' in code
http://d.puremagic.com/issues/show_bug.cgi?id=9369 Andrei Alexandrescu 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: ---
[Issue 9369] DDoc hardcodes '&' -> '&' in code
http://d.puremagic.com/issues/show_bug.cgi?id=9369 --- Comment #10 from github-bugzi...@puremagic.com 2013-01-24 16:02:38 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c6e9191923faa52244feaf67772617f78ae07da0 fix Issue 9369 - DDoc hardcodes '&' -> '&' in code https://github.com/D-Programming-Language/dmd/commit/e7e0d1729994baee870d7b933292a8c22d8f3aa9 Merge pull request #1547 from WalterBright/b30 fix Issue 9369 - DDoc hardcodes '&' -> '&' in code -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 Walter Bright changed: What|Removed |Added CC||bugzi...@digitalmars.com Severity|major |regression -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9369] DDoc hardcodes '&' -> '&' in code
http://d.puremagic.com/issues/show_bug.cgi?id=9369 --- Comment #9 from Walter Bright 2013-01-24 15:31:56 PST --- https://github.com/D-Programming-Language/dmd/pull/1547 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9377] Link-failure regression cause by fixing issue 8504
http://d.puremagic.com/issues/show_bug.cgi?id=9377 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9377] Link-failure regression cause by fixing issue 8504
http://d.puremagic.com/issues/show_bug.cgi?id=9377 --- Comment #2 from github-bugzi...@puremagic.com 2013-01-24 14:27:43 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6a0be5b98961a773c7380ac45f14f1a8a76349b9 fix Issue 9377 - Link-failure regression cause by fixing issue 8504 The test is disabled only in win64 platform. https://github.com/D-Programming-Language/dmd/commit/de4f8f6bf8dc9fcc1730ea4d7f2bbd3e74880f08 Merge pull request #1543 from 9rnsr/fix5933 Issue 5933 & 7159 & 9377 - Invoke function semantic3 correctly where it is required. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6661] Templates instantiated only through is(typeof()) shouldn't cause errors
http://d.puremagic.com/issues/show_bug.cgi?id=6661 --- Comment #6 from github-bugzi...@puremagic.com 2013-01-24 14:27:48 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e9142862884625d0db801bbf1f05ad9487aae28b fix test result for issue 6661 Inherently, when you try to instantiate a template, the whole template body correctness should be checked at the same time. In this case, bug6661!(int).qutz is a normal function declared inside template, so it should be instantiated at the same time with bug6661!(int). Now, the inner `static assert(qutz(13).sizeof!=299);` runs the semantic3 of qutz by calling it. So the module level static assertion fails _correctly_. But, `is(typeof(bug6661x!(int)))` still returns true incorrectly. I think it is yet another known issue in current dmd implementation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7159] Forward reference when casting auto return method
http://d.puremagic.com/issues/show_bug.cgi?id=7159 --- Comment #4 from github-bugzi...@puremagic.com 2013-01-24 14:27:53 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3d5528e985270fe34a7298581df63958c88e506c fix Issue 7159 - Forward reference when casting auto return method https://github.com/D-Programming-Language/dmd/commit/de4f8f6bf8dc9fcc1730ea4d7f2bbd3e74880f08 Merge pull request #1543 from 9rnsr/fix5933 Issue 5933 & 7159 & 9377 - Invoke function semantic3 correctly where it is required. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9386] struct destructor called erroneously
http://d.puremagic.com/issues/show_bug.cgi?id=9386 --- Comment #3 from Gianni Pisetta 2013-01-24 13:03:09 PST --- Maybe I didn't explained well the problem in my first message. In issue 9335 the problem is that dtors aren't called for structs in dynamic arrays, which is fine for me because is the gc at collection that call the dtors. In issue 9334 the problem is that postblit and dtors are called at allocation of a dynamic array only if isn't called the default constructor, and i don't know if it is good or bad. But if you see the output, there aren't no lines that say "Copied " in the output, so here we have the problem that the dtor is called without the postblit, which invalidates any struct that performs the RAII idiom. If you substitute my Test struct of the example in the first message with the File struct of std.stdio module, you will have a Segmentation Fault in linux or a exception FileNotOpened in windows, and it isn't clear what is going on because the structs aren't collected by the gc, no one have called detach() on the files and nobody suspects that the files in the dynamic array are actually been closed at allocation time. I think the best solution here is to have the struct initialized directly in the heap, without the need to first allocate the struct in the stack, as suggested from Maxim Fomin in issue 9334. Then no need to call postblit and dtors, no overhead. But if it isn't possible, then at least it must call the postblit after the structs are copied in the heap and before the call to the dtors on the stack structs, so that any resource remains retained by the struct. The lowered code must be like this: void main() { Test[] tests = [ Test(), Test(), Test(), Test() ]; //these ctors are not called tests[0].ctor("one"); tests[1].ctor("two"); tests[2].ctor("three"); tests[3].ctor("four"); ... } or like this: void main() { Test _temp1; Test _temp2; Test _temp3; Test _temp4; Test[] tests = [ Test(), Test(), Test(), Test() ]; //these ctors are not called _temp1.ctor("one"); tests[0] = _temp1; tests[0].postblit(); // call to postblit constructor _temp2.ctor("two"); tests[1] = _temp2; tests[1].postblit(); // call to postblit constructor _temp3.ctor("three"); tests[2] = _temp3; tests[2].postblit(); // call to postblit constructor _temp4.ctor("four"); tests[3] = _temp4; tests[3].postblit(); // call to postblit constructor _temp1.dtor(); _temp2.dtor(); _temp3.dtor(); _temp4.dtor(); ... } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8411] core.time: No easy way to check if Duration is empty
http://d.puremagic.com/issues/show_bug.cgi?id=8411 Jonathan M Davis changed: What|Removed |Added CC||jmdavisp...@gmx.com --- Comment #1 from Jonathan M Davis 2013-01-24 12:36:20 PST --- We now have Duration.zero, so if(duration != Duration.zero) will work as will if(duration != Duration.init) But there's no such thing as an "empty" duration. All durations have a value, and they aren't ranges or containers. It makes as much sense to have an isEmpty property on a Duration as it does to have it on an int. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9389] ignore -Hd if -Hf is present
http://d.puremagic.com/issues/show_bug.cgi?id=9389 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Walter Bright 2013-01-24 12:10:49 PST --- https://github.com/D-Programming-Language/dmd/pull/1513 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9389] New: ignore -Hd if -Hf is present
http://d.puremagic.com/issues/show_bug.cgi?id=9389 Summary: ignore -Hd if -Hf is present Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bugzi...@digitalmars.com --- Comment #0 from Walter Bright 2013-01-24 12:09:47 PST --- This is done to harmonize how output file names are computed. If you are using both -Hd and -Hf, simply combine the two in -Hf. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9388] Download link for dmd-compatible curl is dead
http://d.puremagic.com/issues/show_bug.cgi?id=9388 Brad Anderson changed: What|Removed |Added CC||e...@gnuk.net --- Comment #1 from Brad Anderson 2013-01-24 11:39:55 PST --- (In reply to comment #0) > The link to DMD2 compatible cURL 7.24.0 on http://dlang.org/download results > in > a page that looks like > > 404 Not Found > > Code: NoSuchKey > Message: The specified key does not exist. > Key: releases/2013/curl-7.24.0-dmd-win32.zip > RequestId: 453F31206E425C16 > HostId: ns062OMU0NroMFA1vRifGUfHrHvZRy7rbTIE9m0Fw8r8ZT1gGvUMBAK1AliXmf44 Here's the old link which still works: https://github.com/downloads/D-Programming-Language/dmd/curl-7.24.0-dmd-win32.zip Of someone could be so kind as to upload that to the new S3 hosting that'd be great. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9388] New: Download link for dmd-compatible curl is dead
http://d.puremagic.com/issues/show_bug.cgi?id=9388 Summary: Download link for dmd-compatible curl is dead Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis 2013-01-24 11:21:20 PST --- The link to DMD2 compatible cURL 7.24.0 on http://dlang.org/download results in a page that looks like 404 Not Found Code: NoSuchKey Message: The specified key does not exist. Key: releases/2013/curl-7.24.0-dmd-win32.zip RequestId: 453F31206E425C16 HostId: ns062OMU0NroMFA1vRifGUfHrHvZRy7rbTIE9m0Fw8r8ZT1gGvUMBAK1AliXmf44 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 --- Comment #2 from Stephan 2013-01-24 10:00:41 PST --- I just checked: The bug definitely was introduced with version 2.061! With dmd version 2.060, everything works fine, with and without the "-O" switch. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6652] foreach parameter with number range is always ref
http://d.puremagic.com/issues/show_bug.cgi?id=6652 --- Comment #26 from github-bugzi...@puremagic.com 2013-01-24 09:56:33 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ac7fd08a9e08fb333d9341f21bdb19ba42e1ee38 fix Issue 6652 - 2. Deprecate modifying non ref variable. https://github.com/D-Programming-Language/dmd/commit/ae95b0f935e00ec03224180a24c4396485367eb8 Merge pull request #1009 from 9rnsr/fix6652_2 fix Issue 6652 - 2. Deprecate modifying non ref variable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9386] struct destructor called erroneously
http://d.puremagic.com/issues/show_bug.cgi?id=9386 Maxim Fomin changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #2 from Maxim Fomin 2013-01-24 08:21:27 PST --- The problem is that dmd lowers the code to like below: void main() { Test _temp1; Test _temp2; Test _temp3; Test _temp4; Test[] tests = [ Test(), Test(), Test(), Test() ]; //these ctors are not called _temp1.ctor("one"); tests[0] = _temp1; _temp2.ctor("two"); tests[1] = _temp2; _temp3.ctor("three"); tests[2] = _temp3; _temp4.ctor("four"); tests[3] = _temp4; _temp1.dtor(); _temp2.dtor(); _temp3.dtor(); _temp4.dtor(); ... } So, the first 8 lines of output comes from 4 stack temporaries, not array. Perhaps you need to look at issue 9335 and issue 9334 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 --- Comment #1 from Stephan 2013-01-24 08:06:00 PST --- During debugging, I actually looked at the value of every single local variable, and you can actually see how the value of some variables (for example "a") changes from one iteration to the next, without any assignment. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9387] New: Compiler switch -O changes behavior of correct code
http://d.puremagic.com/issues/show_bug.cgi?id=9387 Summary: Compiler switch -O changes behavior of correct code Product: D Version: D2 Platform: x86_64 OS/Version: Mac OS X Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: stephan.schiff...@mac.com --- Comment #0 from Stephan 2013-01-24 07:56:09 PST --- Created an attachment (id=1182) Source file with program that The attached program implements a part of Brent's minimization algorithm for one-dimensionsal functions. The code is from Numerical Recipes 3rd edition. I use dmd 2.061/ When I run the program with "rdmd brent_test.d" it runs fine and gives the correct result. When I run it with optimization, i.e. with "rdmd -O brent_test.d", it behaves differently. It enters some infinite loop and eventually throws the expected exception for too many iterations. You can see that I placed a writefln() into line 45, which outputs the value of variable a. When you move this writefln statement just one line below, i.e. below the if-statement, the code runs fine, even with optimization. I colleague of mine suggested that there might be a bug related to a large number of local variables. Maybe some limiting number of registers causes the machine to cache things into memory and pulling them back in a wrong way or something. Appreciate help! Stephan -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9386] New: struct destructor called erroneously
http://d.puremagic.com/issues/show_bug.cgi?id=9386 Summary: struct destructor called erroneously Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: pisetta.gia...@alice.it --- Comment #0 from Gianni Pisetta 2013-01-24 07:26:39 PST --- I had a nasty bug with the std.stdio.File type with the files i had opened and immediately after closed. I striped it down to a bug with the management of dynamic arrays of structs. The code below allocate a dynamic array of Test struct, that output a line for the constructor, postblit constructor and destructor, like the File struct. The output shows that the destructors for each struct are called after constructing the entire array. It isn't the behavior expected, since the struct inside the dynamic array aren't garbage collected yet. I think that the more appropriate behavior is inplace construction without destructor. Here is the code: -- import std.stdio; struct Test { public string name; public this(string name) { this.name = name; writeln( "Created ", name, "..." ); } public this(this) { writeln( "Copied ", this.name, "..." ); } ~this() { writeln( "Deleted ", this.name ); } } void main(string[] args) { Test[] tests = [ Test( "one" ), Test( "two" ), Test( "three" ), Test( "four" ) ]; foreach( Test test; tests ) { writeln( "Foreach ", test.name ); } } -- And the output: -- Created one... Created two... Created three... Created four... Deleted four Deleted three Deleted two Deleted one Copied one... Foreach one Deleted one Copied two... Foreach two Deleted two Copied three... Foreach three Deleted three Copied four... Foreach four Deleted four -- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9386] struct destructor called erroneously
http://d.puremagic.com/issues/show_bug.cgi?id=9386 --- Comment #1 from Gianni Pisetta 2013-01-24 07:29:07 PST --- I forgot to mention that I'm using dmd 2.061. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1619] "Missing initializer for const field" only reported if an explicit constructor is present
http://d.puremagic.com/issues/show_bug.cgi?id=1619 Maxim Fomin changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #2 from Maxim Fomin 2013-01-24 07:24:35 PST --- (In reply to comment #1) > I don't know whether this is a valid report. The same behavior is in D2, afaik > the field will be initialized with .init, whereas if you introduce a > constructor the compiler expects you to initialize it yourself. > > Can anyone with more insight confirm? In both cases i is initialized to 0. import std.stdio; class A { const int i; } class B { const int i; this() { writeln(i); i = 2; } } void main() { A a = new A; B b = new B; } As I understand the point of the requirement is that after exiting from ctor, const member cannot be altered (this assumption can be invalidated). So, the only opportunity to make const member store useful runtime value is during constructor invocation. This ability cannot be replaced by enum or manifest constant because they are shared across all instances. So, the only opportunity to configure at rt a const member which can be different across instances is a ctor (this assumption can be broken). However, loosing this opportunity is not an error : if a user forgot to set up a const member, he can easily go back and modify it. Also a const member is still initialized, so no invalid value is created. When this feature was added it likely had a rationale, but I don't see why not initializing a const member is treated so severely as an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9381] package access can be abused and worked around
http://d.puremagic.com/issues/show_bug.cgi?id=9381 --- Comment #3 from Andrej Mitrovic 2013-01-24 06:39:03 PST --- (In reply to comment #2) > Isn't a dup of http://d.puremagic.com/issues/show_bug.cgi?id=143 ? No, that's related to package not working on variables. It works on functions, but as the sample shows it can be easily worked around. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9385] [Regression 2.057] null literal should be implicitly convertible to bool
http://d.puremagic.com/issues/show_bug.cgi?id=9385 Kenji Hara changed: What|Removed |Added Keywords||pull Summary|[Reresison 2.057] null |[Regression 2.057] null |literal should be |literal should be |implicitly convertible to |implicitly convertible to |bool|bool --- Comment #1 from Kenji Hara 2013-01-24 05:46:25 PST --- https://github.com/D-Programming-Language/dmd/pull/1545 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9385] New: [Reresison 2.057] null literal should be implicitly convertible to bool
http://d.puremagic.com/issues/show_bug.cgi?id=9385 Summary: [Reresison 2.057] null literal should be implicitly convertible to bool Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara 2013-01-24 05:27:32 PST --- This code should work. void main() { assert((null ? true : false) == false); if (null) assert(0); assert(!null); } This regression is introduced from 2.057, by fixing issue 5416. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9372] Class member with @disabled ctor makes class ctor unusable
http://d.puremagic.com/issues/show_bug.cgi?id=9372 --- Comment #8 from Jacob Carlborg 2013-01-24 04:43:05 PST --- (In reply to comment #7) > The issue is debatable, but code below should be supported; > > import std.stdio; > > struct Trouble { > @disable this(); > @disable this(this); > > int dummy; > > this(int x) { > dummy = x; > } > } > > class Room { > Trouble t = Trouble(123); // this should work > > this() { > //t = Trouble(123); > } > } > > void main() { > auto r = new Room; // this is line 23 > } > > Current situation shows either limitation of new implementation (druntime) or > design. I think that should work. The constructor does not initialize the fields, it's done before the constructor is called. This works: extern (C) Object _d_newclass(in ClassInfo); class Room { int i = 3; this (int f) {} } void main () { auto room = cast(Room) _d_newclass(Room.classinfo); assert(room.i == 3); } The constructor is not called but the field is initialized anyway. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9372] Class member with @disabled ctor makes class ctor unusable
http://d.puremagic.com/issues/show_bug.cgi?id=9372 Maxim Fomin changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #7 from Maxim Fomin 2013-01-24 04:02:57 PST --- The issue is debatable, but code below should be supported; import std.stdio; struct Trouble { @disable this(); @disable this(this); int dummy; this(int x) { dummy = x; } } class Room { Trouble t = Trouble(123); // this should work this() { //t = Trouble(123); } } void main() { auto r = new Room; // this is line 23 } Current situation shows either limitation of new implementation (druntime) or design. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9381] package access can be abused and worked around
http://d.puremagic.com/issues/show_bug.cgi?id=9381 Oleg Kuporosov changed: What|Removed |Added CC||oleg.kuporo...@gmail.com --- Comment #2 from Oleg Kuporosov 2013-01-24 03:47:44 PST --- Isn't a dup of http://d.puremagic.com/issues/show_bug.cgi?id=143 ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9242] Add stack smashing code to flush out heisenbugs
http://d.puremagic.com/issues/show_bug.cgi?id=9242 --- Comment #8 from Walter Bright 2013-01-24 02:10:33 PST --- (In reply to comment #7) > OK. (I'd like an error message plus a stack trace when D programs overflow the > stack.) Why not try it and see what happens? In any case, discussing stack overflow here is not the right place, as this issue has nothing in common with it. > See also those pages on StackGuard, that is a third different thing. I know what stackguard is. This is not stackguard, and has nothing to do with it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9242] Add stack smashing code to flush out heisenbugs
http://d.puremagic.com/issues/show_bug.cgi?id=9242 --- Comment #7 from bearophile_h...@eml.cc 2013-01-24 01:33:36 PST --- (In reply to comment #6) > Stack overflow checking is common on CPUs with no virtual memory, such as 16 > bit DOS. Virtual memory systems get stack overflow checking "for free", by > marking the memory page beyond the end of the stack as neither readable nor > writeable. Then the hardware does the check for you. OK. (I'd like an error message plus a stack trace when D programs overflow the stack.) > The stack smashing thing is completely different. I am aware of this. See also those pages on StackGuard, that is a third different thing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1841] Closure detection doesn't work when variable is used in a nested function
http://d.puremagic.com/issues/show_bug.cgi?id=1841 --- Comment #6 from Don 2013-01-24 01:23:08 PST --- The basic problem is that the existing closure detection only checks parents of nested functions. It should also check sibling nested functions. Ie, if one nested function f calls another nested function g, then if g needs a closure, then so does f. More complex cases are possible, such as where f calls g which calls h, f escapes, h uses closure variables but f and g don't. I have a fix for the original test case, still working on the more complex cases. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9384] New: std.socket: UnixAddress broken on Linux and others
http://d.puremagic.com/issues/show_bug.cgi?id=9384 Summary: std.socket: UnixAddress broken on Linux and others Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: al...@ucora.com --- Comment #0 from Rob T 2013-01-24 00:30:51 PST --- std.socket is missing the following import: import core.sys.posix.sys.un; Even when adding in the missing import, the implementation of UnixAddress is broken. Here's my quick fix for Linux (there may be problems with it), there also needs to be versions for OSX and FreeBSD because sockaddr_un is slightly different. import std.c.linux.socket; import core.sys.posix.sys.un; class UnixAddress: Address { private: sockaddr_un sun; this() { } public: override @property sockaddr* name() { return cast(sockaddr*)&sun; } override @property const(sockaddr)* name() const { return cast(const(sockaddr)*)&sun; } override @property socklen_t nameLen() const { return cast(socklen_t) sun.sizeof; } this(in char[] path) { sun.sun_family = AF_UNIX; sun.sun_path.ptr[0..path.length] = cast(byte[])path; sun.sun_path.ptr[path.length] = 0; } @property string path() const { return to!string(sun.sun_path.ptr); } override string toString() const { return path; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9378] std.internal.digest.sha_SSE3 breaks if compiled with PIC
http://d.puremagic.com/issues/show_bug.cgi?id=9378 --- Comment #1 from github-bugzi...@puremagic.com 2013-01-24 00:20:34 PST --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4a6af4e42e6d52288d3a9fb5aeeec9655824bb30 workaround Bug 9378 - SHA1 asm is broken for PIC https://github.com/D-Programming-Language/phobos/commit/ca65b3701a8d108e38a7ce782a04a0fd8e43ab63 Merge pull request #1095 from dawgfoto/workaround9378 workaround Bug 9378 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9383] New: Wrong context for contracts if closure [dis]appears in override function
http://d.puremagic.com/issues/show_bug.cgi?id=9383 Summary: Wrong context for contracts if closure [dis]appears in override function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij 2013-01-24 11:24:55 MSK --- --- import std.stdio; void delegate() del; abstract class A { void f(int i) in { writeln("A.f.in: i = ", i); } body { } // no closure void g(int i) in { writeln("A.g.in: i = ", i); } body { int x; del = { ++x; }; } // closure } final class B: A { override void f(int i) in { writeln("B.f.in: i = ", i); } body { int x; del = { ++x; }; } // closure appears override void g(int i) in { writeln("B.g.in: i = ", i); } body { } // closure disappears } void main() { auto b = new B(); b.f(107); b.g(108); } --- Output: --- A.f.in: i = 909192741 A.g.in: i = 10428304 --- Also see Issue 6417. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---