Re: need help to work around float union non-zero init

2024-09-23 Thread Dakota via Digitalmars-d-learn
On Friday, 20 September 2024 at 16:21:10 UTC, Nick Treleaven wrote: On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote: Thanks to Dennis for the workaround. Thanks your all for the tips, void solution fix me problem.

Re: need help to work around float union non-zero init

2024-09-20 Thread Nick Treleaven via Digitalmars-d-learn
On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote: I need my struct defined as `isZeroInit`, so can I can import them as `di` file. (this also reduce build size) But I find this problem with float inside union: ```d struct test_t { union { int i32; float f32;

Re: need help to work around float union non-zero init

2024-09-20 Thread monkyyy via Digitalmars-d-learn
On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote: I need my struct defined as `isZeroInit`, so can I can import them as `di` file. (this also reduce build size) But I find this problem with float inside union: ```d struct test_t { union { int i32; float f32;

Re: need help to work around float union non-zero init

2024-09-20 Thread IchorDev via Digitalmars-d-learn
On Friday, 20 September 2024 at 09:38:54 UTC, Dakota wrote: I consider this is compiler bug (it may take years to get fixed) I've sent issues for compiler bugs and had them fixed within the next release—about month, not years. Also yes, this seems to be a compiler bug; unless there's some s