NetBSD Problem Report #55453

From www@netbsd.org  Fri Jul  3 17:08:32 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AB53E1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  3 Jul 2020 17:08:32 +0000 (UTC)
Message-Id: <20200703170831.DCF9D1A9218@mollari.NetBSD.org>
Date: Fri,  3 Jul 2020 17:08:31 +0000 (UTC)
From: roland.illig@gmx.de
Reply-To: roland.illig@gmx.de
To: gnats-bugs@NetBSD.org
Subject: indent(1) wrongly indents second to last enum constant
X-Send-Pr-Version: www-1.0

>Number:         55453
>Category:       bin
>Synopsis:       indent(1) wrongly indents second to last enum constant
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 03 17:10:00 +0000 2020
>Last-Modified:  Fri Jul 03 22:45:01 +0000 2020
>Originator:     Roland Illig
>Release:        indent from 9.99 (built on 2020-07-03)
>Organization:
>Environment:
>Description:
cvs up -p -r1.241 usr.bin/make/var.c > var.c
indent -bap -br -ncdb -ci4 -i4 var.c

In line 201, VAR_IN_USE is indented correctly.
In line 203, VAR_FROM_ENV is indented too far to the right.

>How-To-Repeat:

>Fix:

>Audit-Trail:
From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/55453: indent(1) wrongly indents second to last enum constant
Date: Sat, 4 Jul 2020 01:41:30 +0300

 The minimal test case would be the following:

 $ cat enum.c
 typedef enum {
     A0,
     A1
 } E;
 $ indent -bap -br -ncdb -ci4 -i4 enum.c 
 $ cat enum.c
 typedef enum {
     A0,
 	A1
 } E;

 typedef is important here.  Compare also:

 $ cat enum.c
 enum {
     A0,
     A1
 } E;
 $ indent -bap -br -ncdb -ci4 -i4 enum.c 
 $ cat enum.c
 typedef enum {
     A0,
     A1
 }		E;


 -uwe

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.