https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106873
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Kemal Akcam from comment #3) > I did not report as if unsigned short was different than 2 bytes. > > Please check the output and explain > 1. why output values changes? > 2. why it reads/advances 10 bytes instead of 8 bytes? Again you misunderstand everything. The ABI has a requirement for alignment of some fields and that is what is called padding. This is why I said you get a warning with -Wpadding . If you want to remove this padding, you either use a bitfield or you use the attribute packed.