[Issue 5402] Invalid free() when throwing non-Throwable

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5402


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||clugd...@yahoo.com.au
 Resolution||DUPLICATE


--- Comment #2 from Don  2011-02-07 00:07:01 PST ---
This is really a special case of bug 5447, rather than a straight duplicate;
but anyway it is fixed in the next release.

*** This issue has been marked as a duplicate of issue 5447 ***

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


[Issue 5447] Should be illegal to throw a non-Throwable

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5447


Don  changed:

   What|Removed |Added

 CC||bugzi...@kyllingen.net


--- Comment #4 from Don  2011-02-07 00:07:01 PST ---
*** Issue 5402 has been marked as a duplicate of this issue. ***

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


[Issue 5494] [patch,enh] Issues with std.stdarg

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5494


Brad Roberts  changed:

   What|Removed |Added

 CC||bra...@puremagic.com


--- Comment #1 from Brad Roberts  2011-02-07 00:22:39 PST 
---
I think this one can be closed with the next release.  druntime's vararg
support has been updated to support the x86-64 c abi.

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


[Issue 5382] [regression 2.051] DLL multi-threading broken

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5382


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #1 from Walter Bright  2011-02-07 
00:33:26 PST ---
https://github.com/D-Programming-Language/druntime/commit/472a78beb32eec4e209e8d2a2e728e1b0203d8e1

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


[Issue 4069] std.xml.Document.pretty saves empty elements with spaces and line breaks

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4069


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #2 from Walter Bright  2011-02-07 
00:45:13 PST ---
https://github.com/D-Programming-Language/phobos/commit/b3ad939cf41adfefd33b16d2d91ca56d568cddac

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


[Issue 4598] std.xml check is too restrictive

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4598


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #1 from Walter Bright  2011-02-07 
00:50:52 PST ---
https://github.com/D-Programming-Language/phobos/commit/043125d4c7edc216aa47daad1bb94ae6ff4220b1

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


[Issue 3835] ref foreach does not work in CTFE

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3835


Don  changed:

   What|Removed |Added

   Keywords||wrong-code


--- Comment #12 from Don  2011-02-07 00:57:25 PST ---
(In reply to comment #11)
> This bug is worse than it might seem from reading the »rejects-valid« keyword 
> –
> DMD 2.051 happily executes ref foreach during compile-time, but generates 
> wrong
> results silently.
> 
> Should we add a »wrong-ctfe« tag or something like that?

No, incorrect CTFE should just be marked as wrong-code. Yup, this one's
important.

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


[Issue 4332] C files in druntime should be converted to D

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4332



--- Comment #10 from Brad Roberts  2011-02-07 01:15:44 
PST ---
Further testing (dmd's test34) showed that the critical .c to .d change needed
to be reverted as well.  Win32 is back to using the .c version for both files
now.

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


[Issue 3975] Misnamed main causes linker errors

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3975


Bernard Helyer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||blood.of.l...@gmail.com
 Resolution||INVALID


--- Comment #1 from Bernard Helyer  2011-02-07 
02:33:12 PST ---
Yes, that is working as intended. When you compile without '-c' you are telling
DMD to build you an executable -- one whose entry point is 'main'; so the
linker looks for the function, and can't find it, and tells you so. This
behaviour is the same as in C or C++.

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


[Issue 3975] Misnamed main causes linker errors

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3975


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2011-02-07 03:49:26 PST ---
Yet, I'd like the front-end to catch (and show an error message) this common
bug before it reaches the linker, if possible.

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


[Issue 5494] [patch,enh] Issues with std.stdarg

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5494



--- Comment #2 from Rob Jacques  2011-02-07 09:22:50 PST ---
Well, I think Issue 4310 can be closed, so long as std.stdarg gets depreciated
in favor of core.stdarg. There is an API mismatch between the 32-bit and 64-bit
core.stdarg, which should be fixed (I'd suggest making core.stdarg simply
forward to core.stdc.stdarg, which is correct). Also, I think the idea of a
range which wraps _arguments, _argptr and provides a simple and safe way to use
variadic arguments would be a useful enhancement to dRuntime.

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


[Issue 5319] rt.critical/monitor: Add support for Solaris

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5319



--- Comment #3 from Iain Buclaw  2011-02-07 09:29:23 PST ---
Solaris isn't supported in core.sys.posix.pthreads though, is it? (Admittedly I
have a largely unfinished patch to add Solaris support in druntime lingering in
a VM somewhere, so maybe not too much of a worry).

Regards

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


[Issue 5538] New: Immutable classes can't be passed as messages in std.concurrency

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5538

   Summary: Immutable classes can't be passed as messages in
std.concurrency
   Product: D
   Version: D2
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: tomeks...@gmail.com


--- Comment #0 from Tomasz Sowiński  2011-02-07 11:37:04 
PST ---
Test case:

class C {}
thisTid.send(new immutable(C)());
receive((immutable C) { writeln("got it!"); });

This throws:
core.exception.AssertError@/usr/include/d/dmd/phobos/std/variant.d(285):
immutable(C)

And when I replace immutable(C) with Rebindable, I get "Aliases to mutable
thread-local data not allowed.".

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


[Issue 5539] New: Statically disallow unsigned<0 test

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5539

   Summary: Statically disallow unsigned<0 test
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-02-07 12:21:53 PST ---
This is a reduced case (Loss of error flag) for a more common bug:


import core.stdc.stdio: printf;
int foo(bool cant_be_true) {
int error = cant_be_true ? -1 : 1;
return error;
}
void main() {
uint x = foo(true);
if (x < 0)
printf("error!");
}


Gerally I suggest to add to the D front-end a test to statically disallow this
kind of test:

unsigned < 0

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


[Issue 5540] New: Probable bug-hiding redundancies

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5540

   Summary: Probable bug-hiding redundancies
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-02-07 12:33:29 PST ---
This is a real bug in good C++ code:

if ((p_newHeader.frame_num != m_lastSlice.frame_num) ||
(p_newHeader.pic_parameter_set_id !=
 p_newHeader.pic_parameter_set_id) ||
(p_newHeader.field_pic_flag != p_newHeader.field_pic_flag) ||
(p_newHeader.bottom_field_flag != m_lastSlice.bottom_field_flag)
){
return false;
}


The bug is of the kind:
if (x != x) {}

Two other similar bugs:
if (x == x) {}

auto y = x - x;


For the compiler it's easy to spot such three situations. They are correct
code, yet experience shows that often such redundancies hide bugs. So I suggest
to add to DMD warnings for such tree situations.

See also bug 3878

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


[Issue 5541] New: Disallow escaping of references to stack-allocated memory

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5541

   Summary: Disallow escaping of references to stack-allocated
memory
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: accepts-invalid
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-02-07 13:05:29 PST ---
This is D2 code:


struct Foo {
int x;
}
Foo* bar() {
Foo f = Foo(1);
return &f;
}
void main() {}


DMD 2.051 raises a compile-time error:
test.d(6): Error: escaping reference to local f


But this code compiles and runs with no errors with DMD 2.051. I think DMD has
to statically disallow code like this too:


struct Foo {
int x;
}
Foo* bar() {
return &(Foo(1));
}
void main() {}

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


[Issue 5542] New: std.string.join() for chars too

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5542

   Summary: std.string.join() for chars too
   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 2011-02-07 14:32:50 PST ---
This is Python 2.6.6 code (shell):

>>> "x".join("123")
'1x2x3'


This is handy in several situations. So I'd like std.string.join() to join
chars in a similar way:

join("123", "x") ==> "1x2x3"


See also bug 4468

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


[Issue 4468] std.string.join() for lazy iterable of strings

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4468



--- Comment #1 from bearophile_h...@eml.cc 2011-02-07 14:33:28 PST ---
See also bug 5542

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


[Issue 5543] New: to!int to see a char as a single-char string

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5543

   Summary: to!int to see a char as a single-char string
   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 2011-02-07 14:34:44 PST ---
In DMD 2.051 to!int acts as cast(int) on chars:

import std.conv: to;
void main() {
assert(to!int("1") == 1);
assert(cast(int)'1' == 49);
assert(to!int('1') == 49);
}


But I think this is more handy:

import std.conv: to;
void main() {
assert(to!int("1") == 1);
assert(cast(int)'1' == 49);
assert(to!int('1') == 1);
}

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


[Issue 5544] New: all() and any() in Phobos

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5544

   Summary: all() and any() in Phobos
   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 2011-02-07 14:35:37 PST ---
This is Python 2.6.6 code (shell):

>>> items = [1, 7, 22]
>>> all(x % 2 for x in items)
False
>>> items = [1, 7, 21]
>>> all(x % 2 for x in items)
True


The functions all() and any() are very handy.

With Phobos of DMD 2.051 if you want to translate that Python code to a D2
functional style you need something like:


import std.algorithm;
void main() {
auto items = [1, 7, 22];
bool r1 = reduce!q{a && b}(true, map!q{a % 2}(items));
assert(!r1);
items = [1, 7, 21];
bool r2 = reduce!q{a && b}(true, map!q{a % 2}(items));
assert(r2);
}


While using an all() it becomes shorter and more readable, something like
(untested):

import std.algorithm;
void main() {
auto items = [1, 7, 22];
bool r1 = all!q{a % 2}(items);
assert(!r1);
items = [1, 7, 21];
bool r2 = all!q{a % 2}(items);
assert(r2);
}

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


[Issue 5544] all() and any() in Phobos

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5544


Jonathan M Davis  changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com


--- Comment #1 from Jonathan M Davis  2011-02-07 14:51:11 
PST ---
Bug#4405

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


[Issue 5540] Probable bug-hiding redundancies

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5540



--- Comment #1 from bearophile_h...@eml.cc 2011-02-07 15:05:52 PST ---
Another case, in good C++ code (probably caused by not complete copy & paste &
modify):

return Contains(Sphere(lss.mP0, lss.mRadius)) && 
   Contains(Sphere(lss.mP0, lss.mRadius));

That is of this kind:
x && x

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


[Issue 5544] all() and any() in Phobos

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5544


bearophile_h...@eml.cc changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from bearophile_h...@eml.cc 2011-02-07 15:08:53 PST ---
Thank you for letting me know.

*** This issue has been marked as a duplicate of issue 4405 ***

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


[Issue 4405] all function - returns whether predicate is true for all elements in a range

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4405


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #5 from bearophile_h...@eml.cc 2011-02-07 15:08:28 PST ---
I have written a duplicated enhancement request: bug 5544

There I have asked an all() and any() that allow to write code as this:

import std.algorithm;
void main() {
auto items = [1, 7, 22];
bool r1 = all!q{a % 2}(items);
assert(!r1);
items = [1, 7, 21];
bool r2 = all!q{a % 2}(items);
assert(r2);
}

Instead of:

import std.algorithm;
void main() {
auto items = [1, 7, 22];
bool r1 = reduce!q{a && b}(true, map!q{a % 2}(items));
assert(!r1);
items = [1, 7, 21];
bool r2 = reduce!q{a && b}(true, map!q{a % 2}(items));
assert(r2);
}

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


[Issue 4405] all function - returns whether predicate is true for all elements in a range

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4405



--- Comment #6 from bearophile_h...@eml.cc 2011-02-07 15:08:53 PST ---
*** Issue 5544 has been marked as a duplicate of this issue. ***

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


[Issue 4013] Inconsistent codeview debug info for classes derived from IUnknown

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4013


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #2 from Walter Bright  2011-02-07 
15:29:36 PST ---
The name in both places should be just IUnknown. The reason is because that
name is used for C++ name mangling, and has to line up with what the
corresponding C++ compiler does with it.

https://github.com/D-Programming-Language/dmd/commit/411b1e5faf3a93149fa9b31c3f0946020f48ccd0

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


[Issue 4014] CodeView debug type info not linked in from library

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4014


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #2 from Walter Bright  2011-02-07 
15:41:02 PST ---
https://github.com/D-Programming-Language/dmd/commit/86cfbb719175e7527605bc1a379e9d2205328b49

https://github.com/D-Programming-Language/dmd/commit/e921c3a7083a808cf1336de78d645757ff0f5d26

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


[Issue 5325] Mutable references to const/immutable/shared classes

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5325



--- Comment #1 from Michel Fortin  2011-02-07 
19:28:16 EST ---
New patch submitted as a github pull request:
https://github.com/D-Programming-Language/dmd/pull/3

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


[Issue 5545] New: [64-bit] DMD fails to postincrement ubytes.

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5545

   Summary: [64-bit] DMD fails to postincrement ubytes.
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha  2011-02-07 16:38:10 PST ---
I apologize for the length of this test case, it was reduced from a ~1500 line
file with a failing unittest.  The following bug seems to be caused by DMD
failing to increment i in the struct Perm.  It only happens under -O -release
-m64.  Omitting any of these flags makes this program work.  Also, the call to
enforce() is necessary to reproduce the bug.

import std.stdio;

bool enforce(bool value, lazy const(char)[] msg = null) {
if(!value) {
return false;
}

return value;
}

struct Perm {
byte[3] perm;
ubyte i;

this(byte[] input) {
foreach(elem; input) {
enforce(i < 3);
perm[i++] = elem;
stderr.writeln(i);  // Never gets incremented.  Stays at 0.
}
}
}

void main() {
byte[] stuff = [0, 1, 2];
auto perm2 = Perm(stuff);
writeln(perm2.perm);  // Prints [2, 0, 0]
assert(perm2.perm[] == [0, 1, 2]);
}

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


[Issue 4332] C files in druntime should be converted to D

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4332



--- Comment #11 from Iain Buclaw  2011-02-07 16:51:50 PST 
---
Strange...

Are there any reasonable debuggers for Windows? I must admit I'm rather
terrible on the platform, but I could have a bash at seeing what's up, and why
it doesn't work (when Linux is just fine and dandy).

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


[Issue 4486] CodeView debug info should contain absolute path names

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4486


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #1 from Walter Bright  2011-02-07 
18:34:59 PST ---
https://github.com/D-Programming-Language/dmd/commit/a73564e2a477928694cbe88d724e8b8780040455

https://github.com/D-Programming-Language/dmd/commit/7ea404b43d928966e151d9bdce57f908a433dcb5

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


[Issue 4017] const initializer cannot evaluate size of forward referenced alias

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4017


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||WORKSFORME


--- Comment #1 from Walter Bright  2011-02-07 
21:04:28 PST ---
Can't reproduce the error.

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


[Issue 2810] Bogus forward reference error with auto function

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2810


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #12 from Walter Bright  2011-02-07 
21:49:06 PST ---
https://github.com/D-Programming-Language/dmd/commit/79d77f2bdf1c7f121afda1a8e2647fa4ab64f217

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


[Issue 1266] Cannot forward reference the typeof of the base type of a pointer whose base type is defined with typeof

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1266


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME


--- Comment #8 from Walter Bright  2011-02-07 
22:11:53 PST ---
Compiles without error on 2.052 and 1.067

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


[Issue 4092] broken memory management for COM objects derived from IUnknown

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4092


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #3 from Walter Bright  2011-02-07 
22:12:48 PST ---
I'm not comfortable with this change. COM objects should be refcounted, not
gc'd.

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


[Issue 5545] [64-bit] DMD fails to postincrement ubytes.

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5545


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #1 from Walter Bright  2011-02-07 
22:34:30 PST ---
https://github.com/D-Programming-Language/dmd/commit/64b9981229ee44b6126b96222936bd5c35be0e59

https://github.com/D-Programming-Language/dmd/commit/57eddad8d3484ee64736be21ddad1873365fc9b8

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


[Issue 1266] Cannot forward reference the typeof of the base type of a pointer whose base type is defined with typeof

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1266



--- Comment #9 from Don  2011-02-07 22:35:39 PST ---
Fix confirmed: this failed in 2.050 and 1.065 but is fixed in 2.051 and 1.066

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


[Issue 4017] const initializer cannot evaluate size of forward referenced alias

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4017


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #2 from Don  2011-02-07 22:41:54 PST ---
Yup, fixed in 2.048 and 1.063.

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


[Issue 5546] New: Assigning and initializing structs from functions make more copies than necessary

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5546

   Summary: Assigning and initializing structs from functions make
more copies than necessary
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Linux
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: akb...@gmail.com


--- Comment #0 from akb...@gmail.com 2011-02-07 23:31:56 PST ---
When initializing a struct from a function that returns by value, more copies
(calling the post blit and destructors) are called than are necessary. For
example, see the attached source file.

The output for TestCopy.d is currently:
Creating temp
Copying temp
Deleting temp
Creating copy
Copying copy
Deleting copy
Forwarding copy
Copying copy
Deleting copy
Returning global
Copying global
Deleting global
Deleting copy
Deleting temp

Ideally, the output should look like this:
Creating temp
Creating copy
Forwarding copy
Returning global
Copying global
Deleting global
Deleting copy
Deleting temp

When a struct is being initialized by the return value of a function, apart
from the memory being blitted over, no post blit or destructor should need to
be called, since semantically it's equivalent to directly initializing the
struct in the called function. This can be achieved by always returning a local
object and not destructing the local object being returned. In the case of
globalFunc(), which is returning a non-local object, a temporary would be made
before returning from globalFunc().

When assigning the returning value of a function to a struct that's already
initialized, additional optimizations can be made if no custom assignment
operator exists.

For example:
Test testVal;
testVal = function();

This will create the copy for the return value of function(), post blit
testVal, destroy the previous value of testVal, then destroy the return value
of function(). If Test or any of its members have an overridden assignment
operator, they must be called. However, in the case where there is no custom
assignment operator, the post blit of testVal and destruction of the return
value of function() can be omitted, since you are semantically moving the value
from the return value to testVal.

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


[Issue 5546] Assigning and initializing structs from functions make more copies than necessary

2011-02-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5546



--- Comment #1 from akb...@gmail.com 2011-02-07 23:32:33 PST ---
Created an attachment (id=901)
Source file that demonstrates the behavior.

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