[Issue 5982] [2.053 beta] std.iterator gone, but no mention of the change

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5982



--- Comment #2 from Nick Sabalausky cbkbbej...@mailinator.com 2011-05-11 
23:07:55 PDT ---
I guess maybe it was supposed to be gone, but in that case there may have been
an issue with Walter's release-packaging script because it *is* there in both
dmd.2.051.zip and dmd.2.052.zip.

Ie, if you grab these:

http://ftp.digitalmars.com/dmd.2.051.zip
http://ftp.digitalmars.com/dmd.2.052.zip

Inside both of those is /src/phobos/std/iterator.d (and it's not an empty
file).

Even though I've been using 2.052 for over a month, I had some code that was
using the ElementType from std.iterator and I didn't even realize it until I
tried the 2.053 beta which finally did get rid of std.iterator.

So it may be good to at least make mention of this in the changelog. Maybe also
a note to Use either std.range.ElementType or std.range.ElementEncodingType
depending on what you're trying to do.

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


[Issue 5986] New: Function pointers wrongly typed

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5986

   Summary: Function pointers wrongly typed
   Product: D
   Version: unspecified
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: raphael.lond...@gmail.com


--- Comment #0 from Raphael Londeix raphael.lond...@gmail.com 2011-05-12 
02:36:22 PDT ---
Created an attachment (id=967)
full example to reproduce

Hi,

When using auto, the wrong type is infered from the expression Class.method. I
have to fully specify the type. However, even when I do that, the typeid does
not include any information of the argument type (which is Class).

Class a;

auto f = Class.method; // void()*
f(); // Segfault, imho it's normal
f(a); // compile error


void function(Class) f2 = Class.method; // Still void()* !
f2(a); // fine :)

See snippet for full example :)

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


[Issue 5986] Function pointers wrongly typed

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5986



--- Comment #1 from Raphael Londeix raphael.lond...@gmail.com 2011-05-12 
02:52:27 PDT ---
dmd version is v2.052

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


[Issue 5987] New: mydll sample doesn't compile

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5987

   Summary: mydll sample doesn't compile
   Product: D
   Version: D2
  Platform: All
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: simen.end...@pandavre.com


--- Comment #0 from simendsjo simen.end...@pandavre.com 2011-05-12 07:15:05 
PDT ---
dll.d(5): Error: module dll_helper is in file 'core\dll_helper.d' which cannot
b
e read


C:\d\dmd-2.053beta\samples\d\mydll..\..\..\windows\bin\dmd -ofmydll.dll
-L/IMPL
IB mydll.d dll.d mydll.def
dll.d(5): Error: module dll_helper is in file 'core\dll_helper.d' which cannot
b
e read
import path[0] = C:\d\dmd-2.053beta\windows\bin\..\..\src\phobos
import path[1] = C:\d\dmd-2.053beta\windows\bin\..\..\src\druntime\import

C:\d\dmd-2.053beta\samples\d\mydll..\..\..\windows\bin\dmd test.d mydll.lib
OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
mydll.lib
 Warning 2: File Not Found mydll.lib
C:\d\dmd-2.053beta\windows\bin\..\lib\phobos.lib(dmain2)
 Error 42: Symbol Undefined _D5mydll8dllprintFZv
--- errorlevel 1

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


[Issue 5988] New: Error when template is instantiated in a class

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5988

   Summary: Error when template is instantiated in a class
   Product: D
   Version: D2
  Platform: Other
OS/Version: Mac OS X
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: rob...@octarineparrot.com


--- Comment #0 from Robert Clipsham rob...@octarineparrot.com 2011-05-12 
18:43:25 BST ---
The following code:

template Templ(alias T)
{
alias T!int Templ;
}

class C(T) 
{
Templ!C foo;
}

// Uncomment this to make the error go away
//Templ!C foo;

void main()
{
C!int a;
}

Gives the error:

test.d(3): Error: template instance T is not a template declaration, it is a
class

When uncommenting the line mentioned in the code the error goes away,
presumably because the forward reference goes away.

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


[Issue 5268] Outdated windows GUI sample in Samples folder

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5268


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

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


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-05-12 
11:13:13 PDT ---
Fixed dmd 2.053

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


[Issue 5988] Error when template is instantiated in a class

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5988



--- Comment #1 from Robert Clipsham rob...@octarineparrot.com 2011-05-12 
20:19:19 BST ---
This issue can be worked around using:

alias C Workaround;
class C(T)
{
Templ!Workaround foo;
}

This shouldn't be needed though.

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


[Issue 5987] mydll sample doesn't compile

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5987


Sean Kelly s...@invisibleduck.org changed:

   What|Removed |Added

 CC||s...@invisibleduck.org


--- Comment #1 from Sean Kelly s...@invisibleduck.org 2011-05-12 14:28:22 PDT 
---
I believe this is already fixed in the 2.053 beta.

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


[Issue 5987] mydll sample doesn't compile

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5987


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

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


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2011-05-12 
14:41:48 PDT ---
Fixed now.

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


[Issue 5982] [2.053 beta] std.iterator gone, but no mention of the change

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5982


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

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


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-05-12 
14:45:19 PDT ---
Fixed 2.053.

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


[Issue 5989] New: Disallow unreachable statements in switch clause

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5989

   Summary: Disallow unreachable statements in switch clause
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-05-12 
15:23:13 PDT ---
enum State
{
init,
done
}

void main()
{
State state;
int x;

final switch (state)
{
x = 5;  // - can never reach this statement
case State.init:
case State.done:
}

assert(x == 5);  // throws
}

I've run into this while adding some logging to my code. By accident I've added
a print statement right above the case statements inside a final switch, and
was puzzled why my code didn't want to log out any information.

The above code is clearly an error and I think the compiler should disallow or
at least warn about the unreachable statement.

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


[Issue 4957] std.concurrency does not allow to pass Tid in struct fields

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4957


ratchet freak ratchet.fr...@gmail.com changed:

   What|Removed |Added

 CC||ratchet.fr...@gmail.com


--- Comment #1 from ratchet freak ratchet.fr...@gmail.com 2011-05-12 15:28:20 
PDT ---
I've found how it comes:

std.concurrency defines the following testing template for sending parameters
along

//line 49
template hasLocalAliasing(T...)
{
static if( !T.length )
enum hasLocalAliasing = false;
else
enum hasLocalAliasing = (std.traits.hasLocalAliasing!(T[0]) 
!is(T[0] == Tid)) ||
std.concurrency.hasLocalAliasing!(T[1 ..
$]);
}

which handles Tid as a special case which doesn't happen when it's not
top-level

Tid itself is of the form:

//lines 272
struct Tid
{
void send(T...)( T vals )
{
static assert( !hasLocalAliasing!(T),
   Aliases to mutable thread-local data not allowed. );
_send( this, vals );
}


private:
this( MessageBox m )
{
mbox = m;
}


MessageBox  mbox;
}

MessageBox here does not pass the test of !std.traits.hasLocalAliasing (it's a
class object)

quick fix: make mbox in Tid shared and cast accesses to it to thread local this
allows Tid to pass the !std.traits.hasLocalAliasing test *as one would expect
from it*

struct Tid
{
void send(T...)( T vals )
{
static assert( !hasLocalAliasing!(T),
   Aliases to mutable thread-local data not allowed. );
_send( this, vals );
}


private:
this( MessageBox m )
{
mbox = cast(shared)m;
}


shared MessageBox  mbox;
}

//lines 419
private void _send(T...)( MsgType type, Tid tid, T vals )
{
(cast(MessageBox)tid.mbox).put( Message( type, vals ) );
}

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


[Issue 5989] Disallow unreachable statements in switch clause

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5989


bearophile_h...@eml.cc changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from bearophile_h...@eml.cc 2011-05-12 15:33:44 PDT ---
*** This issue has been marked as a duplicate of issue 3820 ***

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


[Issue 3820] Small hole in switch semantics

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3820


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #2 from bearophile_h...@eml.cc 2011-05-12 15:33:44 PDT ---
*** Issue 5989 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 5989] Disallow unreachable statements in switch clause

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5989



--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-05-12 
15:37:34 PDT ---
Thanks for dupping! :)

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


[Issue 5976] variable used before set with foreach with ref + scope(failure) + structure method + -O -inline

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5976


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

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


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-05-12 
17:27:15 PDT ---
https://github.com/D-Programming-Language/dmd/commit/95229fec741951be4d4ad6d5c4a16060c5cde668

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

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

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


[Issue 5990] New: Phobos Win64 - D1

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5990

   Summary: Phobos Win64 - D1
   Product: D
   Version: D1
  Platform: x86_64
OS/Version: Windows
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: ven...@gmail.com


--- Comment #0 from Dan G. ven...@gmail.com 2011-05-12 18:43:16 PDT ---
Created an attachment (id=968)
Phobos patch

Attached is a patch for Phobos/D1 that allows GDC to compile a 64-bit version
of phobos.  It was suggested by Brad Roberts that I also post the patches here.
 More information can be found at the GDC website.

https://bitbucket.org/goshawk/gdc/issue/206/win64-support

Most of the changes are related to Windows use of the LLP64 data model and the
use of uint instead of size_t.

The patch was made against GDC r557 using DMD 1.067.  The patch has not been
tested and is likely only good as a reference.

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


[Issue 5991] New: druntime Win64

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5991

   Summary: druntime Win64
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Windows
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: druntime
AssignedTo: nob...@puremagic.com
ReportedBy: ven...@gmail.com


--- Comment #0 from Dan G. ven...@gmail.com 2011-05-12 18:46:17 PDT ---
Created an attachment (id=969)
Win64 patch for druntime

Attached is a patch for druntime/D2 that allows GDC to compile a 64-bit version
of druntime.  It was suggested by Brad Roberts that I also post the patches
here.  More information can be found at the GDC website.

https://bitbucket.org/goshawk/gdc/issue/206/win64-support

Most of the changes are related to Windows use of the LLP64 data model and the
use of uint instead of size_t.

The patch was made against GDC r557 using DMD 2.052.  The patch has not been
tested and is likely only good as a reference.

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


[Issue 5992] New: Phobos Win64 - D2

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5992

   Summary: Phobos Win64 - D2
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Windows
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: ven...@gmail.com


--- Comment #0 from Dan G. ven...@gmail.com 2011-05-12 18:49:48 PDT ---
Created an attachment (id=970)
D2 phobos Win64 support

Attached is a patch for phobos/D2 that allows GDC to compile a 64-bit version
of Phobos.  It was suggested by Brad Roberts that I also post the patches
here.  More information can be found at the GDC website.

https://bitbucket.org/goshawk/gdc/issue/206/win64-support

Most of the changes are related to Windows use of the LLP64 data model and the
use of uint instead of size_t.

The patch was made against GDC r557 using DMD 2.052.  The patch has not been
tested and is likely only good as a reference.

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


[Issue 5988] Error when template is instantiated in a class

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5988


kenn...@gmail.com changed:

   What|Removed |Added

 CC||kenn...@gmail.com


--- Comment #2 from kenn...@gmail.com 2011-05-12 19:35:48 PDT ---
This is because that class template is actually

template C(T) {
  class C {
declarations
  }
}

so the C inside is referring to the class C, not the template C. This code
works:

class C(T) {
  Templ!(.C) foo;
}

I don't know why uncomment the global instantiation makes the problem goes
away.

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


[Issue 5976] variable used before set with foreach with ref + scope(failure) + structure method + -O -inline

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5976



--- Comment #4 from Vladimir thecybersha...@gmail.com 2011-05-12 20:19:53 PDT 
---
(In reply to comment #1)
 This only happens with -O -inline (-O alone is not sufficient).

Yep, my bad.

(In reply to comment #3)
 https://github.com/D-Programming-Language/dmd/commit/95229fec741951be4d4ad6d5c4a16060c5cde668
 
 https://github.com/D-Programming-Language/dmd/commit/670360ac6616687566854060ad3178cf8c783c38
 
 https://github.com/D-Programming-Language/dmd/commit/04428f78c691991dbbb1f9e17cb45b5f198f8045

Thanks! That fixed my build.

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


[Issue 5993] New: Regression (2.053 beta 13th May): Strange thread exceptions

2011-05-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5993

   Summary: Regression (2.053 beta 13th May): Strange thread
exceptions
   Product: D
   Version: D2
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bagn...@gmail.com


--- Comment #0 from David Bryant bagn...@gmail.com 2011-05-12 22:01:36 PDT ---
Strange exceptions from within threads for code compiled with
dmd 2.053 beta (13th May and previous) not seen using 2.052 or 2.051.

Backtrace:

Thread died unexpectedly:
%score.thread.ThreadException@src/core/thread.d(2338): Unable to suspend
thread

./.bob/bob(extern (C) void core.thread.thread_suspendAll().void
suspend(core.thread.Thread)+0x86) [0x80f5d7a]
./.bob/bob(thread_suspendAll+0x7f) [0x80f5cdf]
./.bob/bob(uint gc.gcx.Gcx.fullcollect(void*)+0x14) [0x80ed6c0]
./.bob/bob(uint gc.gcx.Gcx.fullcollectshell()+0x26) [0x80ed69e]
./.bob/bob(void* gc.gcx.Gcx.bigAlloc(uint, gc.gcx.Pool**, uint*)+0x8a)
[0x80ed226]
./.bob/bob(void* gc.gcx.GC.mallocNoSync(uint, uint, uint*)+0x11d)
[0x80eb9ed]
./.bob/bob(void* gc.gcx.GC.malloc(uint, uint, uint*)+0x4b) [0x80eb8a3]
./.bob/bob(gc_malloc+0x1e) [0x80cb4ae]
./.bob/bob(void* core.memory.GC.malloc(uint, uint)+0xf) [0x80c8173]
./.bob/bob(void[] std.file.read(const(char[]), const(uint))+0xc2)
[0x80dc972]
./.bob/bob(immutable(char)[]
std.file.readText!(immutable(char)[]).readText(const(char[]))+0x16)
[0x80bdfd6]
./.bob/bob(void bob.read_options()+0x73) [0x80b46f3]
...  SNIP 


Thread died unexpectedly: %sobject.Error: Got signal 11 SIGSEGV

./.bob/bob(signalHandler+0x4f) [0x80c5abb]
[0x33f400]
./.bob/bob(gc.gcx.BlkInfo gc.gcx.GC.queryNoSync(void*)+0x17) [0x80ec493]
./.bob/bob(gc.gcx.BlkInfo gc.gcx.GC.query(void*)+0x80) [0x80ec448]
./.bob/bob(gc_query+0x26) [0x80cb6f6]
./.bob/bob(_d_arrayappendcTX+0x5e) [0x80ce19e]
./.bob/bob(_d_arrayappendT+0x2a) [0x80ce09a]
./.bob/bob(bob.Obj bob.Obj.__ctor(bob.Unit, bob.File, immutable(char)[],
bob.DynamicLib[], bob.StaticLib[])+0x177) [0x80b7393]
./.bob/bob(bob.Obj bob.Obj.__ctor(bob.Unit, immutable(char)[],
immutable(char)[], bob.DynamicLib[], bob.StaticLib[])+0xc7) [0x80b75
...  SNIP 

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