[Issue 3402] Please bring back canFind in std.algorithm

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3402


Max Samukha samu...@voliacable.com changed:

   What|Removed |Added

 CC||samu...@voliacable.com


--- Comment #2 from Max Samukha samu...@voliacable.com 2009-10-14 23:39:33 
PDT ---
It is. But a note in the docs would be nice. An example would be enough:

// Checking if the element can be found in the range
assert(find(a, 5).empty);

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


[Issue 3401] Compiler crash on invariant + method overload

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3401


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 CC||clugd...@yahoo.com.au
 OS/Version|Linux   |All
   Severity|normal  |regression


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


[Issue 3401] Segfault(expression.c) on invariant + method overload

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3401


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

Summary|Compiler crash on invariant |Segfault(expression.c) on
   |+ method overload   |invariant + method overload


--- Comment #2 from Don clugd...@yahoo.com.au 2009-10-15 01:57:40 PDT ---
Crashing in VarExp::VarExp(). 
var is NULL.

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


[Issue 3401] Segfault(expression.c) on invariant + method overload

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3401


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

   Keywords||patch


--- Comment #3 from Don clugd...@yahoo.com.au 2009-10-15 02:07:03 PDT ---
func.c, line 1568 (DMD 1.050), in mergeFensure(): Need to check fdensure as 
well as fensure.

FuncDeclaration *fdv = (FuncDeclaration *)foverrides.data[i];
sf = fdv-mergeFensure(sf);
-if (fdv-fensure)
+if (fdv-fensure  fdv-fdensure)
{
//printf(fdv-fensure: %s\n, fdv-fensure-toChars());
// Make the call: __ensure(result)
Expression *eresult = NULL;

Likewise in mergeFrequire, line 1524 should probably be:

FuncDeclaration *fdv = (FuncDeclaration *)foverrides.data[i];
sf = fdv-mergeFrequire(sf);
-if (fdv-frequire)
+if (fdv-frequire  fdv-fdrequire)
{
//printf(fdv-frequire: %s\n, fdv-frequire-toChars());
/* Make the call:
 *   try { __require(); }
 *   catch { frequire; }
 */
Expression *eresult = NULL;
Expression *e = new CallExp(loc, new VarExp(loc, fdv-fdrequire),
eresult);
Statement *s2 = new ExpStatement(loc, e);

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


[Issue 3397] Unintended function call to static opCall

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3397


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2009-10-15 
02:29:09 PDT ---
Why is it a blocker if using stack.pop() works?

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


[Issue 3404] New: JSON output should retain original alias names

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3404

   Summary: JSON output should retain original alias names
   Product: D
   Version: 1.050
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: a...@esperanto.org.ar


--- Comment #0 from Ary Borenszweig a...@esperanto.org.ar 2009-10-15 02:54:38 
PDT ---
For this input:

---
module main;
alias int myInt;
myInt x;
--- 

The JSON output is:

---
{
name : main,
kind : module,
file : main.d,
members : [
{
name : myInt,
kind : alias,
type : int,
line : 5}
,{
name : x,
kind : variable,
type : int,
line : 7}
]
}
--- 

But the last one should be:

---
{
name : x,
kind : variable,
type : myInt,
line : 7}
---

That is, aliases should not be forgotten. This is especially important for
binding libraries where aliases are heavily used.

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


[Issue 3397] Unintended function call to static opCall

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3397



--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2009-10-15 
03:12:12 PDT ---
I've checked in a fix to this one, but not 3367.

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


[Issue 2479] Badcode regression: closure corrupts _argptr value

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2479


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

  Component|Phobos  |DMD
Summary|sformat is broken   |Badcode regression: closure
   ||corrupts _argptr value


--- Comment #5 from Don clugd...@yahoo.com.au 2009-10-15 05:21:36 PDT ---
Reduced test case. This does not seem to be a Phobos bug.
If you remove any reference to s from the delegate (so that it stops being a 
closure), the code works correctly.

void doFormat(void delegate() myputc, void * argptr){
assert(!(*cast(string*)argptr is null));
}

void sformat(string s, ...){
void putc() { assert(s[0]==s[0]); }
doFormat(putc, _argptr);
}

void main(){
sformat(xxx, hi);
}

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


[Issue 2479] Badcode regression: closure corrupts _argptr value

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2479


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 Status|ASSIGNED|NEW


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


[Issue 2852] Cannot pass temporary result by reference (regression)

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2852



--- Comment #3 from Don clugd...@yahoo.com.au 2009-10-15 05:25:26 PDT ---
This is the same as bug 3167. Although this report is older, it's the later one 
which Walter commented on. So I'm closing this one.

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


[Issue 3167] Passing result of a function call as ref argument no longer works

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3167


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 CC||2kor...@gmail.com


--- Comment #9 from Don clugd...@yahoo.com.au 2009-10-15 05:27:05 PDT ---
*** Issue 2852 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 3405] New: DMD crashes during compilation

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3405

   Summary: DMD crashes during compilation
   Product: D
   Version: 1.050
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: m...@krej.cz


--- Comment #0 from Martin Krejcirik m...@krej.cz 2009-10-15 13:41:19 PDT ---
Created an attachment (id=473)
source files

DMD crashes when trying to compile attached program. Extract the zip and run
crash.bat. I was not able to find out the exact cause of this problem, but it
does compile, when you change the order of source files.

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


[Issue 3405] DMD crashes during compilation

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3405


Moritz Warning moritzwarn...@web.de changed:

   What|Removed |Added

 CC||moritzwarn...@web.de


--- Comment #1 from Moritz Warning moritzwarn...@web.de 2009-10-15 14:02:41 
PDT ---
@Martin:
Remove the invariant scope and it will compile.

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


[Issue 3405] DMD crashes during compilation

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3405


Moritz Warning moritzwarn...@web.de changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from Moritz Warning moritzwarn...@web.de 2009-10-15 14:03:32 
PDT ---
*** This issue has been marked as a duplicate of issue 3401 ***

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


[Issue 3406] New: [tdpl] Cannot compile Hello, world or even less with -safe

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3406

   Summary: [tdpl] Cannot compile Hello, world or even less with
-safe
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu and...@metalanguage.com 2009-10-15 
17:23:52 PDT ---
This program:

import std.stdio;

void main() {
}

fails to compile if the -safe switch is used with the error:

/home/andrei/code/dmd/druntime/import/core/stdc/signal.d(25): Error: cast from
int to void C function(int) not allowed in safe mode
/home/andrei/code/dmd/druntime/import/core/stdc/signal.d(26): Error: cast from
int to void C function(int) not allowed in safe mode
/home/andrei/code/dmd/druntime/import/core/stdc/signal.d(27): Error: cast from
int to void C function(int) not allowed in safe mode

We must define and implement the Trusted Computing Base model for druntime and
phobos.

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


[Issue 3407] New: [tdpl] Compiling with -safe -release must keep all bound checks

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3407

   Summary: [tdpl] Compiling with -safe -release must keep all
bound checks
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu and...@metalanguage.com 2009-10-15 
17:30:43 PDT ---
The following program completes successfully when compiled with -safe -release:

void main() {
auto a = new int[2];
auto b = a[3];
}

When the -safe flag is present, all bound checks must be present.

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