Re: [PATCH 1/9] Define a structure for object IDs.
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- May 4, 2014, 16:07 UTC
- Message-ID
- <20140504160728.GN75770@vauxhall.crustytoothpaste.net>
- In-Reply-To
- <5365D91E.70207@alum.mit.edu>
On Sun, May 04, 2014 at 08:07:26AM +0200, Michael Haggerty wrote:
> Please clarify whether you plan to rely on all platforms having "the > same size and alignment constraints" for correctness, or whether that > observation of the status quo is only meant to reassure us that this > change won't cause memory to be wasted on padding.
I plan to write the code portably. My statement was basically that I don't expect this to result in more memory being used. I don't even plan to write the code assuming that offsetof(struct object_id, oid) is 0.
I have owned SPARC systems, and I have experienced plenty of aggravation with code that makes unportable alignment assumptions. I don't want to make that mistake myself.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187