Lars T. Kyllingstad <> changed:

           What    |Removed                     |Added
           Severity|normal                      |major

--- Comment #4 from Lars T. Kyllingstad <> 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:
------- You are receiving this mail because: -------

Reply via email to