https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103839

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For __builtin_clear_padding builtin, that behavior is completely intentional,
for unions the compiler most of the time doesn't know which union member is
currently active, so it acts conservatively, only clears bits that are padding
bits in all union members rather than some of them.
For the internal uses of the __builtin_clear_padding code we'd need some way
how to tell the code which union member is the currently active one so that it
could work differently.

Reply via email to