D - DMD 0.61 release
- Walter (1/1) Mar 30 2003 www.digitalmars.com/d/changelog.html
- Mark T (4/5) Mar 30 2003 please add "http://" in future announce posts to save us from cut and pa...
- Farmer (16/16) Mar 31 2003 Here's some malicous D code, that crashes DMD 0.61 and causes a linker
- Stephan Wienczny (38/41) Apr 01 2003 Hallo,
- Helmut Leitner (12/57) Apr 01 2003 Der Code
- Stephan Wienczny (4/69) Apr 01 2003 Das ist als D-Newbie gut zu wissen! Das Problem ist aber, dass der
- Walter (2/2) Apr 01 2003 I have it fixed now. In the meantime, you can work around it by putting ...
In article <b66c01$155t$1 digitaldaemon.com>, Walter says...www.digitalmars.com/d/changelog.htmlplease add "http://" in future announce posts to save us from cut and paste (at least with MS IE on Win98 thank you
Mar 30 2003
Here's some malicous D code, that crashes DMD 0.61 and causes a linker error: void func() { void* ptr; int[5] array; void ptr*; /* BUG: compiler crashes after saying semicolon expected, not '*' expression expected, not ';' */ if (array==ptr[]) // BUG: should not compile { } } Farmer.
Mar 31 2003
Walter wrote:www.digitalmars.com/d/changelog.htmlHallo, this code causes dmd 0.61 to crash: template TList(T) { class Node { Node prev; Node next; T Value; } class List { Node m_first = null; Node m_last = null; void AddFront(T _Value) { Node cur = new Node; with (cur) { next = m_first; prev = null; Value = _Value; if (next != null) next.prev = cur; } m_first = null; if (m_last == null) m_last = cur; } } } void main(char[][] argv) { alias instance TList(uint).List UIntList; alias instance TList(uint).Node UIntNode; UIntList list; UIntNode node; for (int i = 1; i <= 10; i++) list.AddFront(i); }
Apr 01 2003
Stephan Wienczny wrote:Walter wrote:Der Code UIntList list; erzeugt noch kein gültiges Objekt, dessen Methoden du mit list.AddFront(i); verwenden könntest. Siehe dagegen oben: Node cur = new Node; D ist da ganz gleich wie z. B. Java. -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.comwww.digitalmars.com/d/changelog.htmlHallo, this code causes dmd 0.61 to crash: template TList(T) { class Node { Node prev; Node next; T Value; } class List { Node m_first = null; Node m_last = null; void AddFront(T _Value) { Node cur = new Node; with (cur) { next = m_first; prev = null; Value = _Value; if (next != null) next.prev = cur; } m_first = null; if (m_last == null) m_last = cur; } } } void main(char[][] argv) { alias instance TList(uint).List UIntList; alias instance TList(uint).Node UIntNode; UIntList list; UIntNode node; for (int i = 1; i <= 10; i++) list.AddFront(i); }
Apr 01 2003
Helmut Leitner wrote:Stephan Wienczny wrote:Das ist als D-Newbie gut zu wissen! Das Problem ist aber, dass der Compiler ohne Fehlermeldung abschmiert. Das sollte nicht passieren... Cu StephanWalter wrote:Der Code UIntList list; erzeugt noch kein gültiges Objekt, dessen Methoden du mit list.AddFront(i); verwenden könntest. Siehe dagegen oben: Node cur = new Node; D ist da ganz gleich wie z. B. Java. -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.comwww.digitalmars.com/d/changelog.htmlHallo, this code causes dmd 0.61 to crash: template TList(T) { class Node { Node prev; Node next; T Value; } class List { Node m_first = null; Node m_last = null; void AddFront(T _Value) { Node cur = new Node; with (cur) { next = m_first; prev = null; Value = _Value; if (next != null) next.prev = cur; } m_first = null; if (m_last == null) m_last = cur; } } } void main(char[][] argv) { alias instance TList(uint).List UIntList; alias instance TList(uint).Node UIntNode; UIntList list; UIntNode node; for (int i = 1; i <= 10; i++) list.AddFront(i); }
Apr 01 2003
I have it fixed now. In the meantime, you can work around it by putting the alias declarations at module rather than function scope.
Apr 01 2003