I _know_ that indent isn't supported for C++, but the following bug in
formating C++ code seems like it might represent a more general latent
bug:
$ echo 'int foo::test() const { return 7; }' | gindent
int
foo::test() const const
{
return 7;
}
Note that the 'const' token gets output twice. It only does it with
'const' and not with other tokens:
$ echo 'int foo::test() _const { return 7; }' | gindent
int
foo::test()
_const
{
return 7;
}
$ echo 'int foo::test() volatile { return 7; }' | gindent
int
foo::test()
volatile {
return 7;
}
I can't get it to happen without any C++isms
$ echo 'int foo_test() const { return 7; }' | gindent
int
foo_test()
const {
return 7;
}
but it seems like it shouldn't duplicate tokens under any
circumstances.
If there's a line break in the right place it will concatenate the
tokens:
$ (echo 'int foo::test()' ; echo 'const { return 7; }' ) | gindent
int
foo::test()
constconst
{
return 7;
}
Version info:
$ gindent --version
GNU indent 2.2.9
--
Trevor Blackwell 650 776 7870 address@hidden
_______________________________________________
bug-indent mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-indent