non-uniform behavior when indenting '*' in function declaration with typedefs
Andrés More <[email protected]> Fri, 25 Nov 2011 10:08:23 -0300
| Newsgroups | gmane.comp.gnu.indent.bugs |
|---|---|
| Message-ID | <CAHCmPpNMw_aq8TfWE--VKZYZMrLZG6=kNxV0zBRtgDx=mD=3=g@mail.gmail.com> |
I noted the following issue with 'indent', I could be wrong but I
think it is non-uniform behavior.
When I indent code like [1], the '*' get a different placement if the
item is a typedef.
By the way, [2] does not suffer the same '*' realignment.
I bumped into this while using Linux's Lindent and checkpatch.pl
scripts. Checkpatch reports [3] after Lindent is used.
-- Andres
[1]
static int
function (foo_t * foo, char *bar)
{
return 0;
}
[2]
static int
function (struct foo_s *foo, char *bar)
{
return 0;
}
[3]
ERROR: "foo * bar" should be "foo *bar"