On 21-Apr-14 12:13, Simon Clubley wrote: > It's absolutely crazy that in 2014 we are still writing code which requires > that knowledge to be manually encoded within the program code itself > (in the form of macros) instead of just placing that information within > the data type which is where it belongs. Filly agreed. In Barns's /Ada 2005/ book there was a CD (which I have unfortunately lost) which had several interesting PDFs, one of which dealt with handling endian-independent records via specification clauses [attached: bitorder.pdf], there's another paper [I don't recall if it was on the CD or not] which expand on it to do wholesale byte reversals [attached: Endian-Independent Paper] of an outermost record. So it's not unaddressed in Ada, but it is a little awkward; I think some of these could be helped by Ada 2012 aspects though [Size & Bit_Order on the component types]. (There's also the question of what happens when a component type of the opposite Bit_Order is included... that may be answered in the LRM, but I simply don't recall reading it.)