Bit-field packing order changed between avrgcc implementations

Juergen Harms <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <[email protected]>
Some weeks ago I finally replaced an outdated tarball-installed version 
of avrgcc by an rpm installed recent version (avrgcc-4.7.2).

Surprisingly, this replacement brought a change of the bit-field packing 
order (my application is a distributed system with AT90CAN nodes; the 
limited length of CAN messages forces me to use some packed structures 
in the communication between nodes). With some nodes having been 
compiled before the change, some after, the consequences are evident.

My internode protocol is carefully designed to allow maximum 
independence of node software evolution - but I now realise that the 
bit-field packing order is an implicit part of this protocol. The 
standards are clear that this is implementation and platform dependant. 
I nevertheless want to continue using the ease of compiler-supported 
packing/unpacking - I am ready to bet on changes occuring very 
unfrequently and live with this risk, but with added control.

Question: can somebody suggest some way to tell - say when running make 
- what packing order has been used and to detect if a change has 
happened? Otherwise I need to implement a run-time test that strikes at 
node initialisation (for various reasons way beyond second-best).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.