[Issue 4108] [ICE] __traits(isStaticArray) on empty static array

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4108


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright  2010-04-27 
22:37:47 PDT ---
The same error is produced by:

  void foo(int[0]);

  void main() {
int[0] arr;
foo(arr);
  }

It has nothing to do with __traits.

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


[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130



--- Comment #2 from Torsten  2010-04-27 21:10:12 PDT 
---
(In reply to comment #1)
> Is it possible you could run it under gdb and see where it is dying?

I tried this but there are no debug symbols. I wounder if the memory address
can help you (gdb 6.8):


(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x081427b7 in ?? ()
(gdb) quit
The program is running.  Exit anyway? (y or n) [answered Y; input not from
terminal]

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


[Issue 4081] cannot compile the dmd on FreeBSD 8

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4081


Brad Roberts  changed:

   What|Removed |Added

Attachment #609|application/octet-stream|text/plain
  mime type||
 Attachment #609 is|0   |1
  patch||


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


[Issue 4081] cannot compile the dmd on FreeBSD 8

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4081



--- Comment #2 from Walter Bright  2010-04-27 
17:40:17 PDT ---
changeset 454

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


[Issue 4081] cannot compile the dmd on FreeBSD 8

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4081



--- Comment #1 from Walter Bright  2010-04-27 
17:29:46 PDT ---
Good to see another FreeBSD user!

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


[Issue 4131] break does not work correctly with foreach and associative arrays

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4131


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2010-04-27 15:39:44 PDT ---
This bug is present in dmd 2.043, and it's absent in dmd 1.058 and 1.042.

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


[Issue 4131] New: break does not work correctly with foreach and associative arrays

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4131

   Summary: break does not work correctly with foreach and
associative arrays
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: wrong-code
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: lud...@informatik.uni-luebeck.de


--- Comment #0 from S�nke Ludwig  2010-04-27 
15:01:57 PDT ---
Issuing a break statement will not cause the foreach loop to exit but instead
will perform another iteration before jumping out.

---
import std.stdio;

void main()
{
int[int] test;
test[0] = 0;
test[1] = 1;

bool flag = false;
foreach( k, v; test){
writefln("loop: %s %s", k, v);
assert(!flag); // fails on second loop!
flag = true;
break; // should exit here after the first iteration
}
}
---

output:

---
loop: 0 0
loop: 1 1
core.exception.asserter...@test(12): Assertion failure
---

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


[Issue 3863] Various errors and ICE(todt.c) for struct constructors with ellipses

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3863



--- Comment #6 from S�nke Ludwig  2010-04-27 
14:13:23 PDT ---
Just wanted to note that this bug actually provides the only way to work around
issue 3801. So please, do not fix or change this into an error message before
implementing "struct.member[] = x;" or "struct.member[i] = x;" for CTFE.

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


[Issue 3849] [missing error] Array literal length doesn't match

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3849



--- Comment #5 from bearophile_h...@eml.cc 2010-04-27 13:00:32 PDT ---
Once the length test is in place, to avoid adding the trailing empty items a
very simple ... trailing syntax can be introduced (partially from a suggestion
by Michel Fortin):

immutable ubyte _ctype[256] =
[
_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,
_CTL,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL|_SPC,_CTL,_CTL,
_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,
_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,_CTL,
_SPC|_BLK,_PNC,_PNC,_PNC,_PNC,_PNC,_PNC,_PNC,
_PNC,_PNC,_PNC,_PNC,_PNC,_PNC,_PNC,_PNC,
_DIG|_HEX,_DIG|_HEX,_DIG|_HEX,_DIG|_HEX,_DIG|_HEX,
_DIG|_HEX,_DIG|_HEX,_DIG|_HEX,_DIG|_HEX,_DIG|_HEX,
_PNC,_PNC,_PNC,_PNC,_PNC,_PNC,
_PNC,_UC|_HEX,_UC|_HEX,_UC|_HEX,_UC|_HEX,_UC|_HEX,_UC|_HEX,_UC,
_UC,_UC,_UC,_UC,_UC,_UC,_UC,_UC,
_UC,_UC,_UC,_UC,_UC,_UC,_UC,_UC,
_UC,_UC,_UC,_PNC,_PNC,_PNC,_PNC,_PNC,
_PNC,_LC|_HEX,_LC|_HEX,_LC|_HEX,_LC|_HEX,_LC|_HEX,_LC|_HEX,_LC,
_LC,_LC,_LC,_LC,_LC,_LC,_LC,_LC,
_LC,_LC,_LC,_LC,_LC,_LC,_LC,_LC,
_LC,_LC,_LC,_PNC,_PNC,_PNC,_PNC,_CTL, ...
];


This is first of all explicit, and it doesn't clash with C or C99 syntax, it's
easy to understand, short, easy to write, compatible with other D syntax.

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


[Issue 3987] [gdb] Invalid DWARF output for function pointers

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3987



--- Comment #16 from Walter Bright  2010-04-27 
12:37:33 PDT ---
Robert, I should add that I'm very indebted to you for figuring out what was
going wrong with the dwarf output. Thank you!

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


[Issue 3841] silent implicit cast from floating point to integral in += etc. operators

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3841



--- Comment #1 from Andrei Alexandrescu  2010-04-27 
11:53:59 PDT ---
Hell yeah it is major. Thanks Don.

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


[Issue 4130] DMD crashes if it has to compile a project which is too complex

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright  2010-04-27 
11:44:23 PDT ---
Is it possible you could run it under gdb and see where it is dying?

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


[Issue 3987] [gdb] Invalid DWARF output for function pointers

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3987



--- Comment #15 from Robert Clipsham  2010-04-27 
19:43:59 BST ---
Using r452 all my mini tests are working, I haven't tried QtD or other real
apps, the test cases I got from them seem to work though :)

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


[Issue 2935] ICE(out.c) using struct with constructor as function default argument

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2935



--- Comment #9 from Walter Bright  2010-04-27 
11:37:45 PDT ---
changeset 452

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


[Issue 2437] ICE(tocsym.c, !needThis()) - default struct argument

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2437



--- Comment #8 from Walter Bright  2010-04-27 
11:37:19 PDT ---
changeset 452

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


[Issue 2606] string literals unnecessarily prone to wide conversion

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2606


Don  changed:

   What|Removed |Added

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


--- Comment #1 from Don  2010-04-27 11:31:01 PDT ---
I think this is the same as bug 2367 (although with a stronger example).

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


[Issue 4117] rev 439 compilation error

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4117


Don  changed:

   What|Removed |Added

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


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


[Issue 4011] Incorrect function overloading using mixins

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4011


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 3841] silent implicit cast from floating point to integral in += etc. operators

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3841


Don  changed:

   What|Removed |Added

   Keywords||accepts-invalid
 CC||clugd...@yahoo.com.au
Version|unspecified |1.00
   Severity|normal  |major


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


[Issue 2600] Nonuniform treatment of built-in types and user-defined types in value syntax

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2600


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au
Version|unspecified |2.040
   Severity|normal  |enhancement


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


[Issue 1904] wrong protection lookup for private template functions

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1904


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au
Version|unspecified |0.178


--- Comment #2 from Don  2010-04-27 11:17:10 PDT ---
This applies even to ancient versions of D1.

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


[Issue 3849] [missing error] Array literal length doesn't match

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3849



--- Comment #4 from bearophile_h...@eml.cc 2010-04-27 10:09:45 PDT ---
Walter doesn't want to add the int[$] arr = [...]; syntax:

> D is full of syntax, at some point adding more and more syntax to deal
> with more and more obscure cases is not a net improvement.
> There's a point of diminishing returns.

I still think that when a static array literal is given, the compiler has to
enforce the length of an array literal to be the same as the specified length.
In the uncommon situations where a partial array specification is necessary,
the programmer can just add leading empty items.

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


[Issue 4130] New: DMD crashes if it has to compile a project which is too complex

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4130

   Summary: DMD crashes if it has to compile a project which is
too complex
   Product: D
   Version: 1.057
  Platform: x86
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: globe13.trotte...@gmx.de


--- Comment #0 from Torsten  2010-04-27 09:47:18 PDT 
---
I am trying to compile a medium sized project of roughly 380 files (using
phobos). As long as I keep the total code length (number of lines) under a
limit (yet unknown) dmd creates the executeables sucessfully. However, if I add
some functions to some classes or if I add some new files, it gives a
segmentation fault after roughly 5 minutes of compiling which consumes 350 MiB
of memory. 

If I run dmd with -v, the last lines it prints are:

function  equals
function  notEquals
function  greater
function  lesser
function  greaterOrEqual
function  lesserOrEqual
function  like
function  notIn
function  In
function  this
function  saveToDB
function  saveToDB
function  loadFromDBAsString
Segmentation fault

As far as I can see, the gcc for linking is not called yet.

I have the same problem with older versions of dmd, however I cannot try dmd2.

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


[Issue 2437] ICE(tocsym.c, !needThis()) - default struct argument

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2437


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #7 from Walter Bright  2010-04-27 
09:06:41 PDT ---
I think the correct solution is identified in 2935.

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


[Issue 2935] ICE(out.c) using struct with constructor as function default argument

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2935



--- Comment #8 from Walter Bright  2010-04-27 
09:04:17 PDT ---
The problem is the code here in expression.c funcParameters():

arg = p->defaultArg;
arg = arg->copy();  <-- Danger, Will Robinson!
arg = arg->resolveLoc(loc, sc);
arguments->push(arg);

The arg->copy() is the problem, as it will copy any DeclarationExp's resulting
in multiple declarations with the same name. A correct fix will be to do what
DeclarationExp::doInline() does, which is for any non-static declarations,
create another declaration.

A new expression tree walker has to be built to accomplish this. Perhaps a good
approach is to create a generic walker that accepts a lambda function to
operate on each node.

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


[Issue 2935] ICE(out.c) using struct with constructor as function default argument

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2935


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #7 from Walter Bright  2010-04-27 
08:49:55 PDT ---
The problem is a semantic one. Default arguments are evaluated in the context
of the function declaration, not where it's used. So, the temporary generated
by the constructor is created in global space!

The patch tries to force it back into the function scope, but that doesn't work
as you can see if you change foo() to:

  void foo() { bar(); bar(); }

as it fails trying to allocate the same symbol twice. Not sure what the correct
solution is at the moment.

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


[Issue 3987] [gdb] Invalid DWARF output for function pointers

2010-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3987


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #14 from Walter Bright  2010-04-27 
07:01:51 PDT ---
I think I figured out what was going wrong with the function type caching, and
came up with a corrected fix. Changeset 451. Please give it a try.

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