Yeah I also just went over the C99 spec as well, section 6.7.8, and I have to agree with clang developer's interpretation, that "{ 0 }" only initializes the first member of the union. "{ }" apparently is added in C23 as the "universal zero initializer". So changing the order moving sin6 up is the only way to be C99 conformant. On Mon, Mar 18, 2024 at 3:22 PM NRK wrote: > On Mon, Mar 18, 2024 at 05:34:42PM -0400, Rich Felker wrote: > > If the clang interpretation is going to be this, we can just reorder > > the union members so that the largest one is first. > > Another option is to utilize implicit static initializer rules: > > | if it is a union, the first named member is initialized (recursively) > | according to these rules, and any padding is initialized to zero bits; > > So something like: > > static union u zero; > union u u = zero; > > Though, the "padding bits" part was added in C11 and wasn't present in > C99 in case you want to be pedantic about C99 conformance. > > - NRK >