Back in April I see there was a thread on new behavior which
didn't do the expected thing with !!

The argument at the time was:

"Indeed your described behaviour is a defined part of C, however I'd say
that such a usage falls under the category of 'cleverness' - where most
programmers would need to reach for the manual to verify what the result
would be and what the intention is. See for example what "Writing Solid
Code" - Steve Maguire has to say on the subject (basically "avoid
cleverness"). Since your expression is two applications of an operator
(and not a multi-character operator) I would say that in this regard
version 2.2.11 doesn't regress, but (unintentionally) fixes a
long-standing defect. "


However, there are other unary operators as well; in particular this
also affects the indirection operator '*', without "cleverness".

Now a sequence such as this example:

    struct dirent * * dp;

Is no longer collapsed to:

    struct dirent **dp;

While there is no breakage in this, I would argue that the latter form
is at the very least part of the K&R "style", as it's the only way
the construct appears there - and pretty much anywhere else,
anecdotally.

Yeah, it's been a while; I work on a system where some header files
are generated using database data and some scripts, and then
indent is used to put the result into a consistent style.

Had a little surprise when the build host got upgraded to a distro
using 2.2.11 and suddenly there were many lines of diff...

-- mats


_______________________________________________
bug-indent mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-indent

Reply via email to