Re: [Issue 3054] New: multithreading GC problem. And Stdio not multithreading safe

2009-06-11 Thread Sean Kelly

What is the expected behavior?


Blockers (was Re: [Issue 3001])

2009-06-11 Thread Matti Niemenmaa

Christopher Wright wrote:
--- Comment #1 from Matti Niemenmaa 
  2009-06-11 09:32:40 PDT ---
I'm bumping this to 'blocker' because it's preventing me from using 
DMD for my project.




I think we need clarification on the definition and usage of "blocker". 
I typically would use it to mean that DMD cannot be released until the 
bug is fixed. Other people seem to be using it in a more liberal sense.


http://d.puremagic.com/issues/page.cgi?id=fields.html#importance says 
"[b]locks development and/or testing work." It's not entirely clear 
whether that refers to DMD development or development of anything else 
using DMD.


I think I might've actually used to use your definition of "blocks DMD" 
but have since lapsed into "blocks my work"...


According to the list of all new and old blockers, usage varies:

http://d.puremagic.com/issues/buglist.cgi?query_format=advanced&bug_severity=blocker&order=bugs.bug_status,bugs.bug_id


[Issue 3065] error: this for variable needs to be Type not Type!(arguments).Type

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3065





--- Comment #1 from Chris Wright   2009-06-11 16:35:33 PDT 
---
Created an attachment (id=399)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=399)
implements the more general fix described

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


[Issue 3065] New: error: this for variable needs to be Type not Type!(arguments).Type

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3065

   Summary: error: this for variable needs to be Type not
Type!(arguments).Type
   Product: D
   Version: 1.045
  Platform: Other
OS/Version: Linux
Status: NEW
  Keywords: diagnostic
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dhase...@gmail.com


This message is vague because it does not include any template parameters the
type may have. It is especially galling because the arguments are included in
the second part and not the first.

One fix is expression.c:270, check if ad->type is null. If it is, use the
current code. Otherwise, use ad->type->toChars rather that ad->toChars.

The other fix is to have AggregateDeclaration::toChars return type->toChars if
type is not null.

Since the latter is more general, I favor it.

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


Re: [Issue 3001] Templated types within a mixin not reinstantiated properly for new instantiation

2009-06-11 Thread Christopher Wright

--- Comment #1 from Matti Niemenmaa   
2009-06-11 09:32:40 PDT ---
I'm bumping this to 'blocker' because it's preventing me from using DMD for my
project.



I think we need clarification on the definition and usage of "blocker". 
I typically would use it to mean that DMD cannot be released until the 
bug is fixed. Other people seem to be using it in a more liberal sense.


[Issue 3057] Add pure annotations to core.stdc.*

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3057





--- Comment #10 from Brad Roberts   2009-06-11 09:47:11 
PDT ---
(In reply to comment #8)
> char* str1=obj.str1;
> const char* str2=obj.str2;
> auto len1=strlen(str2);
> str1[0]=0;
> auto len2=strlen(str2);
> assert(str1!=str2,"pwnd");
> 
> GCC has stricter definition of pure function - a function whose arguments are
> contained in the stack (no reference types), in D this definition is extended
> to include immutable reference types, because they effectively behave as value
> types.

That's fine.  That's not a violation of purity as D has defined it.  Purity is
defined, roughly, as:

  1) does not mutate global state
  2) does not depend on global state

or:
  Depends only on it's inputs and mutates only its output.

strlen is a classic example of a pure function.

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


[Issue 3001] Templated types within a mixin not reinstantiated properly for new instantiation

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3001


Matti Niemenmaa  changed:

   What|Removed |Added

   Severity|normal  |blocker




--- Comment #1 from Matti Niemenmaa   
2009-06-11 09:32:40 PDT ---
I'm bumping this to 'blocker' because it's preventing me from using DMD for my
project.

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


[Issue 3064] New: Invalid array operation accepted, generates bad code

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3064

   Summary: Invalid array operation accepted, generates bad code
   Product: D
   Version: 1.045
  Platform: x86_64
   URL: http://www.digitalmars.com/d/1.0/arrays.html
OS/Version: Linux
Status: NEW
  Keywords: accepts-invalid, wrong-code
  Severity: major
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: matti.niemenmaa+dbugzi...@iki.fi


The following compiles in DMD 1.045, but shouldn't:

void main() {
int[] a = [1,2];
int[] b = [1,2];
a[] += b;
assert (b[0] == 1);
assert (b[1] == 2);
assert (a[0] == 2);
assert (a[1] == 4);
}

Currently, the code compiles but the third assertion fails, since DMD generates
code as though b were an int. Note that the following both compiles and doesn't
assert:

void main() {
int[] a = [1,2];
int[] b = [1,2];
a[] += b;
assert (b[0] == 1);
assert (b[1] == 2);
assert (a[0] == 1+*cast(int*)&b);
assert (a[1] == 2+*cast(int*)&b);
}

This is, of course, nonsense.

The error is in the line 'a[] += b': according to
http://www.digitalmars.com/d/1.0/arrays.html "[t]he rvalue can be an expression
consisting either of an array slice of the same length and type as the lvalue
or an expression of the element type of the lvalue, in any combination." Thus
the line is incorrect and should read 'a[] += b[]', and that indeed works.

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


[Issue 3063] New: Importing std.dateparse and dependent files in DMD 2.030 causes DSSS/Rebuild to fail

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3063

   Summary: Importing std.dateparse and dependent files in DMD
2.030 causes DSSS/Rebuild to fail
   Product: D
   Version: 2.030
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: jul...@ifeelrandom.com


An extraneous comma at the end of line 383 (in the array dateidtab[]) of
std/dateparse.d in the Phobos library included with DMD 2.030 (and some
previous alpha versions) causes DSSS and Rebuild to fail after going
out-of-memory (because they can't adequately generate an error from the
incorrect syntax). 

Because of this, anyone who imports std.dateparse, and in turn std.date,
std.file, std.stream etc. will have the compilation of their project fail in
DSSS. Removing the extra comma should fix the problem.

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


[Issue 3062] -run compiler switch ignores -I option

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3062


Frits van Bommel  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||fvbom...@wxs.nl
 Resolution||INVALID




--- Comment #1 from Frits van Bommel   2009-06-11 06:30:51 PDT 
---
This is not a bug. -run is special in that it "eats" everything after it. The
first argument afterwards is interpreted as a source file, the rest as
arguments to pass to the program it compiles to (and are therefore not used by
dmd itself).

What you want to do is "dmd -W -I.. -run tmp.d".

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


[Issue 3062] New: -run compiler switch ignores -I option

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3062

   Summary: -run compiler switch ignores -I option
   Product: D
   Version: 2.030
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: ma...@pochta.ru


>dmd -run tmp.d -w -I..
tmp.d(27): Error: module myutil cannot read file 'mylib\myutil.d'

line 27:
---
import mylib.myutil;
---


>dmd tmp.d -I.. -oftmp.exe -w
this works fine

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


[Issue 3057] Add pure annotations to core.stdc.*

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3057





--- Comment #8 from Sobirari Muhomori   2009-06-11 04:17:10 
PDT ---
char* str1=obj.str1;
const char* str2=obj.str2;
auto len1=strlen(str2);
str1[0]=0;
auto len2=strlen(str2);
assert(str1==str2,"pwnd");

GCC has stricter definition of pure function - a function whose arguments are
contained in the stack (no reference types), in D this definition is extended
to include immutable reference types, because they effectively behave as value
types.

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


[Issue 3057] Add pure annotations to core.stdc.*

2009-06-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3057





--- Comment #9 from Sobirari Muhomori   2009-06-11 04:19:22 
PDT ---
assert(str1!=str2,"pwnd");

*fixed

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