On Thu, 11 Sep 2014, Yury Gribov wrote:
> Ok, it tooks some time. Basically we want brace symbol to behave differently
> in two contexts:
>
> 1) not add any additional offset when not following control flow operator:
> void
> f ()
> {
> int x;
> {
> }
> }
Note that GCC commonly uses custom iteration macros, e.g.:
FOR_EACH_BB_FN(bb, fn)
{
do_stuff;
}
and cinoptions that get the braces-in-switch case wrong should get constructs
like the above right.
(to get gnu-style autoindent in Vim, I've been using
http://www.vim.org/scripts/script.php?script_id=575 and would adjust braces in
switch by hand if need arose; the script is probably very close to one of
approaches posted in this thread, but I haven't checked)
Alexander