Received: by mail.netbsd.org (Postfix, from userid 605) id BA5AF84DDA; Sat, 13 Mar 2021 13:14:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id ED09B84DD2 for ; Sat, 13 Mar 2021 13:14:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id U5GwCa68TzFc for ; Sat, 13 Mar 2021 13:14:14 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 874C384CDF for ; Sat, 13 Mar 2021 13:14:14 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 80AC8FA95; Sat, 13 Mar 2021 13:14:14 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 13 Mar 2021 13:14:14 +0000 From: "Roland Illig" Subject: CVS commit: src To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20210313131414.80AC8FA95@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Roland Illig" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: rillig Date: Sat Mar 13 13:14:14 UTC 2021 Modified Files: src/tests/usr.bin/indent: token-preprocessing.0.stdout src/usr.bin/indent: indent.c Log Message: indent: fix handling of '/*' in string literal in preprocessing line Previously, the '/*' in the string literal had been interpreted as the beginning of a comment, which was wrong. Because of that, the variable declaration in the following line was still interpreted as part of the comment. The comment even continued until the end of the file. Due to indent's forgiving nature, it neither complained nor even mentioned that anything had gone wrong. The decision of rather producing wrong output than failing early is a dangerous one. At least, there should have been an error message that at the end of the file, the parser was still in a a comment, expecting the closing '*/'. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/tests/usr.bin/indent/token-preprocessing.0.stdout cvs rdiff -u -r1.54 -r1.55 src/usr.bin/indent/indent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.