bug-indent
[Top][All Lists]
Advanced

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

Re: [Bug-indent] C++ ability for indent .. code patch and question.


From: david ingamells
Subject: Re: [Bug-indent] C++ ability for indent .. code patch and question.
Date: Wed, 13 Feb 2002 22:18:04 +0100

Preston,
I've tested your updates and there are problems. I will therefore not be 
accepting your updates.
The standard regression tests are enclosed in th attachment. Unpack it in 
your indent directory.

David.

1) The following should be unchanged by indent:

void
main (int argc, char *argv[])
{
/*lint -save *//* test of comment in column 1 */
  farlj ();
}

Your version gives
main (int argc, char *argv [])

note the space before the [].
2)
          {"T", PRO_KEY, 0, ONOFF_NA, 0, &exp_T},

gets changed into

          {
          "T", PRO_KEY, 0, ONOFF_NA, 0, &exp_T}

3) What should be:
          char c[8] = {
            0, 0, 0, 0,
            1, 1, 1, 1
          };
is output as:
          char c [8] =
          {
          0, 0, 0, 0, 1, 1, 1, 1};

4) What should be:
            *destaddr++ = *srcaddr++;
is outout as:
            *destaddr++ = * srcaddr++;

On Friday 08 February 2002 10:13 pm, Preston A. Elder wrote:
> Carlo Wood wrote:
> > On Sat, Jan 12, 2002 at 04:58:00PM +0100, Carlo Wood wrote:
> >>I think that the correct strategy is to never catenate two '>' tokens.
> >>If might be better to add a flag to parser_state_tos that indicates
> >>that the last token was a '<' and then request a space before the
> >>current '<' token if there was also a space before it in the input.
> >
> > s/</>/g
>
> Its been a little while since you've heard from me.
>
> Once again, take it or leave it, however please find attached the patch
> to indent v2.2.7 that makes indent not only WORK with C++, but also
> actually make C++ pretty while doing it.
>
> I run this over C and C++ code, and you may want to review it and put
> some if (c_plus_plus) definitions around it or something.  Or you may
> want to drop this on the floor, but this is my contribution to the
> cause.  I hope you will intergrate this into 2.2.8 when it comes out.
>
> (I currently run this on all my C++ code, and I get no more errors or
> warnings from compilation than I did before, and the code compiles just
> fine ...)
>
> Thanks,

-- 
David Ingamells
address@hidden
+31 (013) 5093388     (home)
+31 065010947 (mobile)

Attachment: regression.tar.gz
Description: GNU Zip compressed data


reply via email to

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