Re: astyle

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Mon, 07 Jan 2008 21:10:57 -0700

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.
Received on Mon Jan 07 2008 - 21:11:05 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST