Existing implementation puts undef into padding bits which almost always
compiled into zeroes. However with -ftrivial-auto-var-init=pattern those undefs
became 0xAA pattern and break some code. We need to zero initialized them.
C++ requires zeroes in padding bit.
(6.3) — if T is a (possibly cv-qualified) union type, its padding bits (6.7) are initialized to zero bits
Looks like C does not require but a lot of code already relies on this behavior.
10. If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate.
If an object that has static or thread storage duration is not initialized explicitly, then:
— if it is a union, the first named member is initialized (recursively) according to these rules, and
any padding is initialized to zero bits;
21. If there are fewer initializers in a brace-enclosed list than there are elements or members of an
aggregate, or fewer characters in a string literal used to initialize an array of known size than there
are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as
objects that have static storage duration.