avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Bit-field packing order changed between avrgcc implementa


From: Juergen Harms
Subject: [avr-gcc-list] Bit-field packing order changed between avrgcc implementations
Date: Sun, 02 Dec 2012 12:33:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]