#149583 GNU indent does not follow GNU coding standards

Package:
indent
Source:
indent
Description:
C language source code formatting program
Submitter:
Akim Demaille
Date:
2024-03-12 11:54:06 UTC
Severity:
normal
Tags:
#149583#5
Date:
2002-06-10 17:02:01 UTC
From:
To:
Hi!

indent does pretty much of a good job with C++, but I suspect that it
is confused by `<' as can be found in C++.  On the following sample:

void
visit (void)
{
  if (bar)
    dynamic_cast < const Record * >(baz);
  else
  record = 0;
}

it reports:

/tmp % indent type-visitor.hh                                    nostromo 19:00
indent: type-visitor.hh:6: Error:Unmatched 'else'

and improperly indents the else branch.

Thanks!

#149583#8
Date:
2002-06-10 19:07:06 UTC
From:
To:
Hello.

I received this from the Debian bug system. I've checked and it may
also be reproduced using indent-2.2.8 (not packaged for Debian yet).
[ Please keep the Cc: lines when replying. Thanks. ]

Package: indent
Version: 2.2.7-2
Severity: normal

Hi!

indent does pretty much of a good job with C++, but I suspect that it
is confused by `<' as can be found in C++.  On the following sample:

void
visit (void)
{
  if (bar)
    dynamic_cast < const Record * >(baz);
  else
  record = 0;
}

it reports:

/tmp % indent type-visitor.hh                                    nostromo 19:00
indent: type-visitor.hh:6: Error:Unmatched 'else'

and improperly indents the else branch.

Thanks!

#149583#9
Date:
2002-06-10 20:17:48 UTC
From:
To:
| it reports:
|
| /tmp % indent type-visitor.hh
| indent: type-visitor.hh:6: Error:Unmatched 'else'

While we're at it: indent does not follow the GNU Coding Standards:
there is no need for `Error', but mainly neither Error nor Unmatched
should be capitalized.

I have no idea whether it matters to you :)

#149583#10
Date:
2002-06-11 17:19:12 UTC
From:
To:
When will these people learn?
If indent works with any C++ it is just your good luck. indent is not
supported for use with C++ code.

Problem report rejected.

#149583#15
Date:
2002-06-11 19:49:36 UTC
From:
To:
david ingamells wrote:

Ok, but what about the GNU Coding Standards part?

AFAIK, indent is still GNU indent.

#149583#16
Date:
2002-06-11 20:02:58 UTC
From:
To:
david> When will these people learn?

When taught.

david> If indent works with any C++ it is just your good luck. indent
david> is not supported for use with C++ code.

I seem to recall Carlo Wood did some work about C++.  I seem to find
template, class etc. in indent.  So forgive me to not understand
properly what you name C.

#149583#27
Date:
2024-03-12 11:36:33 UTC
From:
To:
NGE
PARC D'ACTIVITE DE LAURADE
13103 SAINT-ETIENNE-DU-GRES
FRANCE

Hello,
I am Jean BERNADET General Manager and legal representative of the
company NGE.
Our company would like to collaborate with you.
Please send us your catalog with the best price.
Your prompt reply will be highly appreciated.


Best regard
Jean Bernadet
General Manager
Phone :+33.01.76.27.66.56
Fax: +33176276666
VAT: FR79504124801

#149583#28
Date:
2024-03-12 11:36:33 UTC
From:
To:
NGE
PARC D'ACTIVITE DE LAURADE
13103 SAINT-ETIENNE-DU-GRES
FRANCE

Hello,
I am Jean BERNADET General Manager and legal representative of the
company NGE.
Our company would like to collaborate with you.
Please send us your catalog with the best price.
Your prompt reply will be highly appreciated.


Best regard
Jean Bernadet
General Manager
Phone :+33.01.76.27.66.56
Fax: +33176276666
VAT: FR79504124801