http://d.puremagic.com/issues/show_bug.cgi?id=3449
Lars T. Kyllingstad <bugzi...@kyllingen.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #4 from Lars T. Kyllingstad <bugzi...@kyllingen.net> 2010-09-21 04:43:38 PDT --- More strangeness: If you don't explicitly provide an initial value for const/immutable members, they do contribute to the size of the struct. struct Foo { const int i; } writeln(Foo.sizeof); // Prints 4 struct Bar { const int i = 123; } writeln(Bar.sizeof); // Prints 1 I suspect that this bug could cause unexpected memory corruption when such structs are, for instance, passed to C functions -- especially when the behaviour depends on such a small detail. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------