[Issue 3274] dmd fails to emit code for templates into object file if several files are compiled at once

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


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

   What|Removed |Added

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


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2011-04-04 
23:17:05 PDT ---
The compiler does this as a compile performance optimization. Otherwise,
template instantiations have to be done over and over, filling the object
files, and then the linker has to remove the duplicates.

The workaround for an incremental build system is straightforward - put only
one source module on a command to dmd at a time.

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


Language Reference

2011-04-05 Thread Morlan
After clicking on Template in the left menu of Language Reference on
http://d-programming-language.org/ page, the menu collapses to start menu,
while for other items it remains visible.


Language Reference: Usual Arithmetic Conversions

2011-04-05 Thread Morlan
The following section from the Language Reference does not correspond to
the current dmd compiler (v2.052, Windows) behaviour:


Integer values cannot be implicitly converted to another type that cannot
represent the integer bit pattern after integral promotion. For example:

ubyte  u1 = cast(byte)-1;   // error, -1 cannot be represented in a ubyte
ushort u2 = cast(short)-1;  // error, -1 cannot be represented in a ushort
uint   u3 = cast(int)-1;// ok, -1 can be represented in a uint
ulong  u4 = cast(ulong)-1;  // ok, -1 can be represented in a ulong


Both byte and short casts work all right.


[Issue 2990] TypeInfo.init() returns invalid array

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
11:31:07 PDT ---
This is deliberate, see the typinf.c code:

// void[] init;
dtsize_t(pdt, sd-structsize);   // init.length
if (sd-zeroInit)
dtsize_t(pdt, 0);// NULL for 0 initialization
else
dtxoff(pdt, sd-toInitializer(), 0, TYnptr);// init.ptr

I'll fix the documentation.

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


Re: Language Reference: Usual Arithmetic Conversions

2011-04-05 Thread Simen kjaeraas

On Tue, 05 Apr 2011 20:10:19 +0200, Morlan h...@valentimex.com wrote:


The following section from the Language Reference does not correspond to
the current dmd compiler (v2.052, Windows) behaviour:


Integer values cannot be implicitly converted to another type that cannot
represent the integer bit pattern after integral promotion. For example:

ubyte  u1 = cast(byte)-1;   // error, -1 cannot be represented in a ubyte
ushort u2 = cast(short)-1;  // error, -1 cannot be represented in a  
ushort

uint   u3 = cast(int)-1;// ok, -1 can be represented in a uint
ulong  u4 = cast(ulong)-1;  // ok, -1 can be represented in a ulong


Both byte and short casts work all right.


Please use bugzilla to file issues:
http://d.puremagic.com/issues/enter_bug.cgi

--
Simen


[Issue 2990] TypeInfo.init() returns invalid array

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


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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
11:41:20 PDT ---
https://github.com/D-Programming-Language/druntime/commit/a771c11bfe357ac2c6c87e96b39e8986286222f5

https://github.com/D-Programming-Language/phobos/commit/50a73bef9ac0e6f8bbc713c1ded85a8254175feb

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


Re: Language Reference

2011-04-05 Thread Simen kjaeraas

On Tue, 05 Apr 2011 20:04:43 +0200, Morlan h...@valentimex.com wrote:


After clicking on Template in the left menu of Language Reference on
http://d-programming-language.org/ page, the menu collapses to start  
menu,

while for other items it remains visible.



Please use bugzilla to file issues:
http://d.puremagic.com/issues/enter_bug.cgi

--
Simen


[Issue 5812] Power expression optimisation: constant fold (x^^0) = 1

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



--- Comment #2 from Iain Buclaw ibuc...@ubuntu.com 2011-04-05 16:00:43 PDT ---
Created an attachment (id=937)
implement noted foldable code in this report

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


[Issue 5812] Power expression optimisation: constant fold (x^^0) = 1

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


Iain Buclaw ibuc...@ubuntu.com changed:

   What|Removed |Added

 Attachment #937 is|0   |1
   obsolete||


--- Comment #3 from Iain Buclaw ibuc...@ubuntu.com 2011-04-05 16:08:49 PDT ---
Created an attachment (id=938)
just noticed previous patch allows to bypass an error - fixed

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


[Issue 3831] writeln of a delegate typeid

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


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

   What|Removed |Added

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


--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
20:39:25 PDT ---
3086 doesn't fix it. It could be fixed by having toString() demangle the deco.

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


[Issue 3543] : ? operator can't find common type for classes/interfaces

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
21:21:03 PDT ---
(In reply to comment #1)
 This also fails if you're doing this with classes (just replace interface
 with class in the example above).
 With classes, this should definitely work, but it fails.

It works with classes when I try it.

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


[Issue 3543] : ? operator can't find common type for classes/interfaces

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


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

   What|Removed |Added

   Severity|normal  |enhancement


--- Comment #6 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
21:39:01 PDT ---
I'm going to mark this as an enhancement. When the inheritance graph is
non-trivial, I don't think it's so obvious which, if any, of the ancestors
should be picked. Perhaps the user should decide.

So I'm skeptical this is a good idea.

Meanwhile, it does work for classes, which make sense because classes are
single inheritance. A common root, if there is one, would be only one.

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


[Issue 3712] Error message without filename or line numbers on invalid code

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


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

   What|Removed |Added

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


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
22:06:40 PDT ---
dmd 1.068 and 2.053 produce

test.d(3): Error: undefined identifier DmdFails
test.d(8): Error: template instance test.foo!(int) error instantiating

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


[Issue 4028] delegates with differing default arguments lead to same template instantiation

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #6 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
22:15:35 PDT ---
(In reply to comment #4)
 The two delegates *are* the same type, so they are supposed to lead to the 
 same 
 template instantiation. Introducing a default parameter does not create a new 
 type.
 I'm not sure why function pointers with default parameters are accepted at 
 all. 
 I think it should be an error.

I suspect the only way to deal with this is, as you suggest, disallowing
default arguments for function pointers. I don't know what the downside of that
is, though.

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


[Issue 4039] Another possible DWARF issue

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
22:24:35 PDT ---
Curiously, neither dwarfdump nor objdump complain about either a.o or b.o
individually.

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


[Issue 4062] can call method without this pointer inside is()

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


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2011-04-05 
22:48:42 PDT ---
It's definitely a bug. Fixing it requires moving the check for the error from
e2ir.c to semantic().

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