3 ms·
No, the ordering of bitfields is implementation defined rather than undefined. So if you figure out a bitfield pattern that works on your compiler for your arch
by ChuckMcM 9y ago
No, the ordering of bitfields is implementation defined rather than undefined. So if you figure out a bitfield pattern that works on your compiler for your architecture it will continue to work for you. It is not very portable but for embedded applications that often isn't a problem.
- keithnz 9y agoalso, given this is "Embedded" C, the compilers often provide libs to target micros with bitfields, so it has a known definition.
- tzahola 9y ago>So if you figure out a bitfield pattern that works on your compiler More like: if your compiler is documented to implement bitfields a certain way.
- geofft 9y agoIt is also not portable to new versions of the same compiler, or possibly different flags passed to the same compiler and version.