Re: Any way to workaround Optlink crash?

2009-09-01 Thread Tom S
Max Samukha wrote: Tom S wrote: And/or compile some modules without -g. Maybe you don't need debug symbols everywhere. And please vote for http://d.puremagic.com/issues/votes.cgi?action=show_bug&bug_id=424. Something makes Walter think this bug is not critical. I think he knows... But it

Re: Any way to workaround Optlink crash?

2009-09-01 Thread Lars T. Kyllingstad
Tom S wrote: Max Samukha wrote: Tom S wrote: And/or compile some modules without -g. Maybe you don't need debug symbols everywhere. And please vote for http://d.puremagic.com/issues/votes.cgi?action=show_bug&bug_id=424. Something makes Walter think this bug is not critical. I think he k

Re: Any way to workaround Optlink crash?

2009-09-01 Thread Max Samukha
Tom S wrote: > Max Samukha wrote: >> Tom S wrote: >>> And/or compile some modules without -g. Maybe you don't need debug >>> symbols everywhere. >>> >>> >> >> And please vote for >> http://d.puremagic.com/issues/votes.cgi?action=show_bug&bug_id=424. >> Something makes Walter think this bug is not

Re: Array init

2009-09-01 Thread Max Samukha
bearophile wrote: > A question about D1 specs (that may be useful for LDC). > > In the following code there's anarray of structs S. Is it OK, according to > D1 specs, to not initialize the memory of this array if the compiler sees > that all fields of S have a void init? > > struct S { double x

Re: Array init

2009-09-01 Thread Steven Schveighoffer
On Tue, 01 Sep 2009 07:06:25 -0400, Max Samukha wrote: bearophile wrote: A question about D1 specs (that may be useful for LDC). In the following code there's anarray of structs S. Is it OK, according to D1 specs, to not initialize the memory of this array if the compiler sees that al

Re: Array init

2009-09-01 Thread Max Samukha
Steven Schveighoffer wrote: >> That's an interesting question. The compiler does set void-initialized >> member variables to zeros: >> >> struct S { double x = void, y = void; } >> void main() { >> S s; // x and y are initialized to 0 >> } >> >> I think this is a bug. Such members should be le

Re: Array init

2009-09-01 Thread Max Samukha
Don wrote: > > Agreed. (But it's just a performance issue, it's not incorrect to > initialize them to zero). And void initializers are all about performance :) Otherwise, they are useless.

Re: Any way to workaround Optlink crash?

2009-09-01 Thread Jérôme M. Berger
Max Samukha wrote: Tom S wrote: Max Samukha wrote: COFF/ELF output would not be that bad though, at least if there's some linker that supports these *and* its license allows it to be bundled with DMD. I doubt such a linker exists. And if it does, I doubt it is of quality good enough to replac

Re: Array init

2009-09-01 Thread bearophile
Max Samukha: > IMO, the initialization code shouldn't be generated for aggregates that have > all members void-initialized, and consequently for arrays of such > aggregates. Thanks to all people that have given me answers and opinions. I have discussed this topic a bit with Tomas Lindquist Olsen

Re: D2 Pointer confusion

2009-09-01 Thread Ellery Newcomer
Umm.. A shot in the dark? void main(){ struct SomeStruct{ int* p; void aa(int a){ *p = a; } } class SomeClass{ int a; SomeStruct foo(){ SomeStruct m; m.g = &a; return m; } } SomeClass inst = new SomeClass; ins

Re: Any way to workaround Optlink crash?

2009-09-01 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jérôme M. Berger wrote: > Max Samukha wrote: >> Tom S wrote: >>> Max Samukha wrote: >>> COFF/ELF output would not be that bad though, at least if there's some >>> linker that supports these *and* its license allows it to be bundled >>> with DMD. >> >>