bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug with case labels


From: Lynn Kerby
Subject: Re: Bug with case labels
Date: Sat, 23 Sep 2006 11:14:03 -0700


On Sep 22, 2006, at 2:21 AM, Prakhar Deep wrote:
switch(c)
{
case 1:
{

}
        PREFIX
case2:
SUFFIX
{

}

}

We ran indent with following options: -kr -ts4 -l120 -bad -nbbo -br -nce -nbfda -nut

Prakhar,

I did a little investigation and the problem of successive runs changing the file seems to be triggered by the -kr option (or more correctly some setting that is modified by that option). When -kr was removed, the output was constant.

However,....

I don't believe indent can or should handle this code as it is not technically legal C (or C++) IMO. I am assuming that PREFIX and SUFFIX are some preprocessor definitions that evaluate to legal statements, but indent is not aware of their expansions. If I add terminators to both PREFIX and SUFFIX, the output is constant (confused, but constant).

If someone can convince me that indent *should* support this syntax (please include reference to C spec or GNU extension document) then I might consider it a bug.

Lynn Kerby





reply via email to

[Prev in Thread] Current Thread [Next in Thread]