Subject: Re: [PATCH 1/9] Define a structure for object IDs.

From: Andreas Schwab <[email-masked]>
Date: Sun, 04 May 2014 12:55:43 +0200

Johannes Sixt <[email-masked]> 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, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."