[Issue 5639] New: allow snn.lib to be replaced by other C runtimes

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

   Summary: allow snn.lib to be replaced by other C runtimes
   Product: D
   Version: D1  D2
  Platform: All
OS/Version: Windows
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: mrmoc...@gmx.de


--- Comment #0 from Trass3r mrmoc...@gmx.de 2011-02-22 01:09:56 PST ---
Linking D .obj files and COFF files via UniLink has shown that we might run
into issues with different C RTLs.
And since snn.lib has to be recompiled for 64-Bit anyway, can't we remove any
non-standard dependencies in the same step:

Don wrote:
That's pretty good. Almost all of those things are standard C.
LDIV and UDIV could easily be eliminated.
__except_list is a null asm label (it is FS:[0]).

So the main problematic ones are:
_xi_a , __acrtused_con, the __fp functions, and _Ccmp


helloworld.obj(helloworld) 
 Error 42: Symbol Undefined __acrtused_con
C:\dmd\windows\bin\..\lib\phobos.lib(dmain2) 
 Error 42: Symbol Undefined __except_list
C:\dmd\windows\bin\..\lib\phobos.lib(memory) 
 Error 42: Symbol Undefined __xi_a
C:\dmd\windows\bin\..\lib\phobos.lib(lifetime) 
 Error 42: Symbol Undefined __LDIV@
C:\dmd\windows\bin\..\lib\phobos.lib(stdio) 
 Error 42: Symbol Undefined ___fhnd_info
C:\dmd\windows\bin\..\lib\phobos.lib(conv) 
 Error 42: Symbol Undefined __ULDIV@
C:\dmd\windows\bin\..\lib\phobos.lib(stdio) 
 Error 42: Symbol Undefined ___fp_unlock
C:\dmd\windows\bin\..\lib\phobos.lib(stdio) 
 Error 42: Symbol Undefined ___fp_lock
C:\dmd\windows\bin\..\lib\phobos.lib(ti_cfloat) 
 Error 42: Symbol Undefined __Ccmp

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


[Issue 5640] New: error with constructing RedBlackTree from range of array (typesafe variadics)

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

   Summary: error with constructing RedBlackTree from range of
array (typesafe variadics)
   Product: D
   Version: D2
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: lutger.blijdest...@gmail.com


--- Comment #0 from Lutger lutger.blijdest...@gmail.com 2011-02-22 01:29:22 
PST ---
The following does not compile:

auto tree = RedBlackTree!string(foo, bar, baz);

Error message:

Error: template std.container.RedBlackTree!(string).RedBlackTree.__ctor(U) if
(isImplicitlyConvertible!(U,Elem)) does not match any function template
declaration
Error: template std.container.RedBlackTree!(string).RedBlackTree.__ctor(U) if
(isImplicitlyConvertible!(U,Elem)) cannot deduce template function from
argument types !()(string,string,string)

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


[Issue 5640] error with constructing RedBlackTree from range of array (typesafe variadics)

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



--- Comment #1 from Lutger lutger.blijdest...@gmail.com 2011-02-22 01:30:04 
PST ---
It is an issue with type inference from typesafe variadics, the constructor for
RedBlackTree deduces U to immutable(char) rather than string:

this(U)(U[] elems...) if (isImplicitlyConvertible!(U, Elem))

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


build my project error with dmd.2.052

2011-02-22 Thread zsxxsz
dmd -oftest adl/*.d main/*.d import/acl/*.d ./lib/lib_acl.a
/usr/bin/ld: unrecognized option '--no-warn-search-mismatch'
/usr/bin/ld: use the --help option for usage information

my ld: GNU ld version 2.17.50.0.6-6.el5 20061020


Re: build my project error with dmd.2.052

2011-02-22 Thread Jonathan M Davis
On Tuesday 22 February 2011 02:10:28 zsxxsz wrote:
 dmd -oftest adl/*.d main/*.d import/acl/*.d ./lib/lib_acl.a
 /usr/bin/ld: unrecognized option '--no-warn-search-mismatch'
 /usr/bin/ld: use the --help option for usage information
 
 my ld: GNU ld version 2.17.50.0.6-6.el5 20061020

Please don't post directly to the bug list. You sign up for it so that you get 
all of the updates to bugs on bugzilla. Normally, you'd post to D.learn (for 
questions about D) or D (for discussing the language). In this case, either 
posting to the thread which announced the release od 2.052 in D.announce or 
posting in D would probably be the best choice.

In any case, my guess is that you have an old version of binutils. You're going 
to have to either update your linux insteall or edit your dmd.conf so that it 
doesn't use --no-warn-search-mismatch (though that means that you're likely to 
get warnings about library version mismatches for Phobos; the flag is there 
because both the 32-bit and 64-bit versions of Phobos are ld's search path, and 
it's annoying for it to complain about the one which you aren't using just 
because it's for the wrong architecture).

- Jonathan M Davis


[Issue 4808] UNEXPECTED OPTLINK TERMINATION AT EIP=0042787B

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


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||DUPLICATE


--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2011-02-22 
02:18:12 PST ---
The bug file no longer exists, so I can't verify it, but the IP address of the
fault looks to be about the same as bugzilla 2436, which was resolved.

Therefore, I'm going to mark this as a duplicate of 2436.

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

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


[Issue 2436] Unexpected OPTLINK termination EIP = 00425303 with /co

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


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

   What|Removed |Added

 CC||nfx...@gmail.com


--- Comment #9 from Walter Bright bugzi...@digitalmars.com 2011-02-22 
02:18:15 PST ---
*** Issue 4808 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 5641] New: Local instantiation does not save context properly

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

   Summary: Local instantiation does not save context properly
   Product: D
   Version: D2
  Platform: Other
OS/Version: All
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu and...@metalanguage.com 2011-02-22 
06:10:45 PST ---
The following program compiles but produces an incorrect result. It prints:

[false, false, false, false, true]

although it should print

[true, true, false, false, false]

When fixing this bug, care must be given to avoiding conservative dynamic
allocation of the frames in all cases. This would consistently ruin performance
of most of std.algorithm. Instead, the compiler should detect only the cases
when context must be saved and only act on those cases. Saving should happen
inside non-static struct Result, ideally without dynamic allocation (although
I'm not sure how that would be done in the general case).

Alternatively, the compiler could reject the example as written and require the
user to save the context manually, in a TBD manner. Don, Walter, let's talk
about this, it's important.

After fixing, this example should work if the template map2 is removed and
std.algorithm.map is used instead.

import std.algorithm, std.array, std.stdio;

template map2(alias fun)
{
auto map2(R)(R r)
{
struct Result
{
R _input;

this(R input)
{
_input = input;
}

@property bool empty()
{
return !_input.length;
}

void popFront()
{
_input.popFront();
}

@property auto ref front()
{
return fun(_input.front);
}
}

return Result(r);
}
}

auto fun(int[] a)
{
auto y = 42;
auto m = map2!((x) { return x == y; })(a);
return m;
}

void main()
{
auto a = [ 1, 2, 3, 4, 5 ];
auto m = fun(a);
writeln(m);
}

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


[Issue 5641] Local instantiation does not save context properly

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



--- Comment #1 from Andrei Alexandrescu and...@metalanguage.com 2011-02-22 
06:32:25 PST ---
Correction. The program should print [false, false, false, false, true].
Alternatively, replacing y = 42 with y = 3 should print the originally claimed
output.

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


[Issue 5641] Local instantiation does not save context properly

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


wfunct...@hotmail.com changed:

   What|Removed |Added

 CC||wfunct...@hotmail.com


--- Comment #2 from wfunct...@hotmail.com 2011-02-22 11:46:25 PST ---
Apparently, type-inference also has a problem here:

This code:
int b = 5;
writeln(map!((a) { return a + b; })([0, 1, 2, 3]));
outputs:
[1637916, 1637917, 1637918, 1637919]

if I specify the type of 'a' manually:
int b = 5;
writeln(map!((int a) { return a + b; })([0, 1, 2, 3]));
it outputs:
[0, 1, 2, 3]

Of course, both answers are incorrect, but this might be an indication of
another bug; I don't know.

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


[Issue 5641] Local instantiation does not save context properly

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


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

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


--- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2011-02-22 
12:10:35 PST ---
A workaround for those that need this code to work is to use static (it can be
used for type inference just like auto):

import std.stdio;
import std.algorithm;
auto fun(int[] a)
{
static y = 3;
return map!((x) { return x == y; })(a);
}
void main()
{
auto a = [ 1, 2, 3, 4, 5 ];
auto m = fun(a);
writeln(m);
}

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


[Issue 3372] optlink silently mistreats object files with more than 16384 symbols

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


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-02-22 
14:24:24 PST ---
Fixed optlink 8.00.10

The limit on the number of symbols per object file should now be 0x7FFF. This
limit is hardcoded in the OMF object file format.

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


[Issue 3372] optlink silently mistreats object files with more than 16384 symbols

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


Andrei Alexandrescu and...@metalanguage.com changed:

   What|Removed |Added

 CC||and...@metalanguage.com


--- Comment #4 from Andrei Alexandrescu and...@metalanguage.com 2011-02-22 
14:38:22 PST ---
We should mark this day as a federal holiday :o).

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


[Issue 5623] Slow GC with large heaps

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


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

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||s...@invisibleduck.org


--- Comment #10 from Sean Kelly s...@invisibleduck.org 2011-02-22 15:01:51 
PST ---
I think the separation of pools for large and small allocations is a good
thing.  In fact, the current collector will return entirely free pools to the
OS at the end of a collection cycle, so the two are already logically separate.
 I can't think of a case where performance would be worse than before, but I'll
give the patch a once-over to be sure.

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


[Issue 5642] New: borken ddoc build using std.random.uniform

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

   Summary: borken ddoc build using std.random.uniform
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: s...@extrawurst.org


--- Comment #0 from Stephan Dilly s...@extrawurst.org 2011-02-22 16:06:57 PST 
---
compiling this using dmd main.d -D is broken but used to work under dmd2.051:

module main;

import std.random;

void main(string[] argv)
{
auto bar = uniform(0,1);
}

building this gives:
OPTLINK (R) for Win32  Release 8.00.8
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
main.obj(main)
 Error 42: Symbol Undefined
_D3std6random44__T7uniformVAyaa10_5b242852504152454e
29TiTiZ7uniformFiiZi
--- errorlevel 1

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


[Issue 3118] Need a clear spec on how inapplicable attributes are handled

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



--- Comment #4 from Stewart Gordon s...@iname.com 2011-02-22 16:11:49 PST ---
(In reply to comment #3)
 attribute int a;
 attribute: int a;
 attribute { int a; }
 
 should all have the same meaning for a.

This whole debate is about legality, not meaning.  Defining that they always
all have the same legality erodes the usefulness of the colon notation
especially, since one could try to use it and then be forced to move a
declaration to which it doesn't make sense to above the attribute, which can
get annoying if you want to place declarations in some intuitive or logical
order.

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


[Issue 3372] optlink silently mistreats object files with more than 16384 symbols

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


changlon chang...@gmail.com changed:

   What|Removed |Added

 CC||chang...@gmail.com


--- Comment #5 from changlon chang...@gmail.com 2011-02-22 18:50:03 PST ---
I use latest dmd 1.067, optlink  8.00.10 .

latest tango and dwtx ,  re builad all lib.

in on console run. link.exe it tell me the version is 8.00.10 .

use xfbuild for the dwtx lib .

the optlink throw a error like:


dwtx is big,  the lib is 30M .

http://gool.googlecode.com/files/optlink_bug.jpg

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


[Issue 4275] Unexpected optlink termination when 'export' attribute is missing

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


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-02-22 
21:52:26 PST ---
Fixed Optlink 8.00.11

(The fix is just to output an error message, rather than crash.)

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


[Issue 5643] release

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


Brad Roberts bra...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bra...@puremagic.com
 Resolution||INVALID


--- Comment #1 from Brad Roberts bra...@puremagic.com 2011-02-22 22:45:58 PST 
---
Um.. this bug report lacks any sort of info to point to any sort of bug.  Try
again?

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


[Issue 3372] optlink silently mistreats object files with more than 16384 symbols

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



--- Comment #6 from Rainer Schuetze r.sagita...@gmx.de 2011-02-22 23:29:12 
PST ---
I can confirm this bug is fixed. 

Even if it's only the limit that has been pushed to 32768 without other
changes, you won't be able to stuff an object file with more symbols into
optlink because dmd 2.052 asserts with

Internal error: ..\ztc\cgobj.c 425

This could be a bit more friendly, though.

There might be projects that need more symbols still, so a work around is to
not compile into a single object file, but to multiple object files. You
currently have to do this by calling dmd twice, once for compilation and then
for linking as the output filename will otherwise also be used for the single
object file.

The problem described in comment 5 is probably not related to this bug, but the
crasher bugs, e.g. 2436.

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


[Issue 5644] The mangling of constructors is not documented by the ABI.

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



--- Comment #1 from Bernard Helyer blood.of.l...@gmail.com 2011-02-22 
23:31:34 PST ---
Some poking around reveals that 'this' turns into '__ctor', and then it is just
mangled as a function. This should be documented in the ABI section.

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


[Issue 5644] New: The mangling of constructors is not documented by the ABI.

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

   Summary: The mangling of constructors is not documented by the
ABI.
   Product: D
   Version: D2
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: websites
AssignedTo: nob...@puremagic.com
ReportedBy: blood.of.l...@gmail.com


--- Comment #0 from Bernard Helyer blood.of.l...@gmail.com 2011-02-22 
23:30:26 PST ---


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