https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92486
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> --- Whether memcpy needs to preserve the value of padding bits is debatable (and has been debated in WG14 for a couple of decades now). The value of padding bits is described as unspecified, and an unspecified value is described as a "valid value of the relevant type where this International Standard imposes no requirements on which value is chosen in any instance." The "chosen in any instance" has been interpreted as permitting the observed value to change from one read to another. Examples of this effect are in DR #260 and DR #451. Although they deal with uninitialized objects whose value is indeterminate, since objects of types like char have no trap representation, their uninitialized and indeterminate value is simply unspecified, same as that of padding bits.