digitalmars.D.bugs - DMD 0.97: crash with struct sorting
- k2 <k2_member pathlink.com> Aug 04 2004
- Arcane Jill <Arcane_member pathlink.com> Aug 04 2004
- Nick <Nick_member pathlink.com> Aug 04 2004
- Juanjo =?ISO-8859-15?Q?=C1lvarez?= <juanjuxNO SPAMyahoo.es> Aug 04 2004
- Nick <Nick_member pathlink.com> Aug 05 2004
DMD 0.97: crash with struct sorting
This code causes DMD 0.97 to segfault:
struct Foo {
int opCmp(Foo f)
{
return 0;
}
}
int main(char[][] args)
{
Foo[] foo;
foo.sort;
return 0;
}
---
w2000 DMD 0.97
Aug 04 2004
In article <ceq9g7$25mj$1 digitaldaemon.com>, k2 says...DMD 0.97: crash with struct sorting This code causes DMD 0.97 to segfault: struct Foo { int opCmp(Foo f) { return 0; } } int main(char[][] args) { Foo[] foo; foo.sort; return 0; } --- w2000 DMD 0.97
Presumably Foo.sizeof is zero, which I imagine would cause problems for sort? Jill
Aug 04 2004
In article <cerbqk$cus$1 digitaldaemon.com>, Arcane Jill says...Presumably Foo.sizeof is zero, which I imagine would cause problems for sort? Jill
It's the compiler that crashes, not the program. (A simple test also comfirms that .sort doesn't mind empty arrays.) Nick
Aug 04 2004
k2 wrote:DMD 0.97: crash with struct sorting This code causes DMD 0.97 to segfault: struct Foo { int opCmp(Foo f) { return 0; } } int main(char[][] args) { Foo[] foo; foo.sort; return 0; }
Seems to work on Linux.
Aug 04 2004
In article <cers5l$m3a$1 digitaldaemon.com>, Juanjo =?ISO-8859-15?Q?=C1lvarez?= says...Seems to work on Linux.
I get a segfault on Linux, haven't tried Windows (but it should be the same.) Since k2 used the word "segfault" I assume that was on Linux as well. Nick
Aug 05 2004









Nick <Nick_member pathlink.com> 