Re: non-uniform behavior when indenting '*' in function declaration with typedefs

Petr Pisar <[email protected]> Mon, 28 Nov 2011 10:52:02 +0100
Newsgroups gmane.comp.gnu.indent.bugs
Message-ID <[email protected]>
On Fri, Nov 25, 2011 at 10:08:23AM -0300, Andrés More wrote:
> 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.
> 

indent(1) reads:

You must use the ‘-T’ option to tell indent the name of all the typenames in
your program that are defined by typedef.

And then you get uniform indentation. I guess this this because typedefs can
be defined in separate header files, so indent requires manual definition
usind -T option.

On the other hand, I cannot image situation when pointer to unknown type
should be handled specially. Maybe indent confuses it with arithmetic
expression.

-- Petr

_______________________________________________
bug-indent mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-indent
signature.asc (application/pgp-signature, 230 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iF4EABEIAAYFAk7TWcEACgkQEsnFx2fG+qJ1hQEAnT76EilT79wDg7C3vSRhxWAr
hER49Hqq5RjiA2VgYQIA/2k58OdK7f9FWsmJq7NGno7JXPbE3magAbwa8gexEpNw
=o9y8
-----END PGP SIGNATURE-----