I downloaded and compiled the 2.06 tarball just today (to check out this problem found on 2.05.1 on Ubuntu 16.04).
The issue is that this properly indented array of ClassName objects:
ClassName table[] =
{
ClassName(classarg1name, sizeof(some_long_struct_name), 1,
ClassName::DESTINATION, 60000, "0.0.0.0"),
ClassName(classarg1name, sizeof(some_long_struct_name), 1,
ClassName::DESTINATION, 60001),
};
After formatting becomes this:
ClassName table[] =
{
ClassName(classarg1name, sizeof(some_long_struct_name), 1,
ClassName::DESTINATION, 60000, "0.0.0.0"),
ClassName(classarg1name, sizeof(some_long_struct_name), 1,
ClassName::DESTINATION, 60001),
};
astyle command-line:
--indent=spaces=3 -A1 --pad-header --unpad-paren -p -j -k3 -m0 -M70 -z2 -xC100
astyle version:
Artistic Style Version 2.06
Fixed.
Perhaps a separate bug but definitely related. Given the arguments -xC100 and -M70, I expect this:
To be reformatted to this:
This might still be an options related problem though my understanding is that the combination of -xC100 and -M70 should guarantee the correct behavior. Indeed, this is exactly what happens if the above lines are moved just inside a function's opening brace. It appears -xC100 is ignored in the above initializer list context.