[gnu.utils.bug] indent bug

colin@tenset.UUCP (Colin Manning) (11/20/89)

I have been trying to get GNU indent working on a 386 box running
SCO Xenix 2.3.1, and have experienced problems getting it to
format the following C code with the -gnu option:


func(a)
char *a;
{
	if (strcmp(a,"fred") == 0)
	{
		printf (a);
	}
	else  /* comment   */
	{
		printf ("a is not fred");
	}
}

Indent seems to get a bit upset at the comment after the else.  It normally
hangs and has to be interrupted.  Experimentation indicates that it is the
requested brace formatting style that causes the problem.

Doing 'indent -version' gives:
	GNU indent 1.0.  Based on Berkeley indent 5.11 (9/15/88).

Anyone got any ideas ?

Thanks in advance, 

- Colin.



-- 
-----------------------------------------------------------------------
| colin@tenset.uucp or        | Post: Tenset Technologies Limited,    |
|  ..!ukc!acorn!tenset!colin  |       Norfolk House,                  |
| Phone: +44 223 328886       |       301 Histon Road,                |
| Fax:   +44 223 460929       |       Cambridge CB4 3NF, UK.          |
-----------------------------------------------------------------------

djm@eng.umd.edu (David J. MacKenzie) (11/23/89)

In article <188@tenset.UUCP> colin@tenset.UUCP (Colin Manning) writes:
>	}
>	else  /* comment   */
>	{
>Indent seems to get a bit upset at the comment after the else.  It normally
>hangs and has to be interrupted.  Experimentation indicates that it is the
>requested brace formatting style that causes the problem.
>
>Doing 'indent -version' gives:
>	GNU indent 1.0.  Based on Berkeley indent 5.11 (9/15/88).

This problem is fixed in GNU indent 1.1.
--
David J. MacKenzie <djm@eng.umd.edu>