From: Andreas Schwab Date: Sun, 04 May 2014 10:55:43 GMT Subject: Re: [PATCH 1/9] Define a structure for object IDs. Message-ID: In-Reply-To: <536606AB.1020803@kdbg.org> Johannes Sixt writes: > I think that a compiler that has different size and alignment requirements > for the proposed struct object_id and an unsigned char[20] would, strictly > speaking, not be a "C" compiler. Unlike arrays, a struct can have arbitrary internal padding. It is perfectly compliant (and even reasonable) to make struct object_id require 8 byte alignment, adding 4 bytes of padding at the end. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."