September 20 [Issue 24776] New: Struct with anonymous union has wrong isZeroInit | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24776 Issue ID: 24776 Summary: Struct with anonymous union has wrong isZeroInit Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: nick@geany.org struct S6 { union { int i1; float f1; } } static assert(__traits(isZeroInit, S6)); // fails S6.init should be zero - `{ S6.i1.init }` according to: https://dlang.org/spec/property.html#init PR incoming. -- |
Copyright © 1999-2021 by the D Language Foundation