bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

non-uniform behavior when indenting '*' in function declaration with typ


From: Andrés More
Subject: non-uniform behavior when indenting '*' in function declaration with typedefs
Date: Fri, 25 Nov 2011 10:08:23 -0300

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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]