This may result in the entire union not being initialized. For example:
union U {
uint32_t x;
uint64_t y;
};
void func() {
U u = {};
...
}Some might assume that U u = {} zero-initializes the whole union whereas only the bits that compose U.x are zero-inited.
Oddly enough (mostly from what I've seen personally), this seems to only matter in the case we use -ftrivial-auto-var-init=pattern where llvm undefs are replaced with non-zero values. In any normal case, it seems that these undefs just get lowered to zeros.
See: http://lists.llvm.org/pipermail/cfe-dev/2019-September/063383.html