--cuddle-else removes empty line after if

"Håkon A. Hjortland" <[email protected]>
Newsgroups gmane.comp.gnu.indent.bugs
Message-ID <[email protected]>
Example code:
----------------------------------------
int
main ()
{
  if (1)
    {
    }

  //
  return 0;
}
----------------------------------------

Running "indent --cuddle-else" removes the empty line after "if":
----------------------------------------
$ indent --cuddle-else a.c -o b.c
$ diff -u a.c b.c
--- a.c 2008-05-13 01:30:57.000000000 +0200
+++ b.c 2008-05-13 01:31:08.000000000 +0200
@@ -16,7 +16,6 @@
   if (1)
     {
     }
-
   //
   return 0;
 }
----------------------------------------

Expected result:
The line should not be removed.

It seems all these conditions must be met for the bug to appear:
1) --cuddle-else option used
2) "if" with braces and without "else"
3) Followed by one or more empty lines, then a "//"-comment
If there is more than one empty line, only one will be removed.

--
Håkon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.