May 15, 2011
A simple app like:
void foo()
{
    throw new Exception("");
}
void main() { foo(); }

$ dmd -debug -g testexc.d && testexc.exe:
D:\dev\code\d_code>object.Exception@testexc.d(3):
----------------
40CD40
40CBB7
4025EB
4021E7
411FC1
----------------

$ cv2pdb testexc.exe testexc.exe
$ testexc.exe
object.Exception@testexc.d(3):
----------------
D:\dev\code\d_code\testexc.d(5): D main

cv2pdb creates a .pdb file with symbol names. If I delete the file the
symbols won't display again.
It didn't work on a fresh Win7 with the debugging sdk installed on a
virtual machine, unless I used cv2pdb on the exe. So I'm not sure
what's wrong.
May 16, 2011
Jonathan M Davis wrote:
> On 2011-05-15 03:50, Joel Christensen wrote:
>> Looks like enum's are tighter (eg. 'enum last = media[ $ - 1 ];' doesn't
>> work now). It was working in 52. I had heard it might be relaxed, not
>> tightened. I get the error, 'cannot be read at compile time'.
>>
>> Also immutable imstr = "test"; printf( toStringz( imstr ) ); wasn't
>> working at first, but works now for some reason.
>>
>> Good to have an update though.
> 
> A lot of CTFE stuff was rewritten. What all of the implications of that are, I don't know, but according to Don (who did the rewrite), there are cases which compiled before but didn't generate correct code. I don't know if there were any cases which compiled which were supposed to be illegal.

There are VERY MANY cases which compiled before, which were supposed to be illegal. The compiler used to accept a variable where it needed a compile-time constant!

> Regardless,
> because there was a major rewrite for CTFE, the risk of CTFE bugs or behavioral changes is higher than is the case for most releases.

To clarify:
Two massive fixes were made, which are independent of each other:
(1) CONSTANT FOLDING: any case where a compile-time value is required now MUST be a compile-time value. If a compile-time value is not required, there is no attempt to interpret it. This fixed many accepts-invalid bugs.
(2) CTFE: array literals no longer use copy-on-write (which gave totally wrong semantics). This fixed many wrong-code bugs.

Fixing (2) also allowed a huge number of CTFE bugs to be fixed.

This particular example is a consequence of (1), and has nothing to do with the CTFE changes.
May 16, 2011
I'm getting a segfault while compiling my code with the 64-bit version of dmd 2.053. I can't seem to figure out where the problem exists, but something is making me think that it is a problem with std.parallelism. Attached is the output of dmd with -v.

Walter Bright wrote:
> Thanks for everyone's hard work on this release!
>
> http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.067.zip
>
> Now includes FreeBSD:
>
> http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.052.zip


May 16, 2011
On 5/16/2011 10:11 AM, Jonathan Crapuchettes wrote:
> I'm getting a segfault while compiling my code with the 64-bit version of dmd
> 2.053. I can't seem to figure out where the problem exists, but something is
> making me think that it is a problem with std.parallelism. Attached is the
> output of dmd with -v.

Please, all bug reports should be posted to bugzilla.
1 2 3 4
Next ›   Last »