On Tue, 2008-01-08 at 16:45 +1300, Amos Jeffries wrote: > On the bit-field problem, I have a similar mind. Even though the wrap is > extremely ugly the suggested fix makes code almost unreadable.
The fix (pre- and post-processing) is invisible to the programmer. It would be auto-performed before and after astyle is run. > If we have to go the way of hacking bitfields around astyle, I would > suggest going to a macro (yuck). Like so: > > #define BITFIELD(name,bits) unsigned int name : bits > > struct { > BITFIELD(name, 1); > BITFIELD(flag, 1); > } That could work indeed, provided astyle does not mangle the above into some other ugly representation, especially if comments are added after the declaration. Thank you, Alex.