From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [C source] Inconsistent comments on preprocessor conditionals Date: Fri, 08 Jul 2022 15:55:52 +0300 Message-ID: <8335fb4vc7.fsf@gnu.org> References: <87sfnb3h5m.fsf@disroot.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7727"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Akib Azmain Turja Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 08 14:58:01 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9nYW-0001o8-Kl for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jul 2022 14:58:00 +0200 Original-Received: from localhost ([::1]:47044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9nYV-0003N8-5l for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jul 2022 08:57:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9nWV-0001FA-4l for emacs-devel@gnu.org; Fri, 08 Jul 2022 08:55:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9nWU-0002d9-AN; Fri, 08 Jul 2022 08:55:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5ZkopyjLIPSySTe+1b5YaReiJNGm+wfHIq2FqsWmu1Q=; b=QvRd24Cy2SqT SU7gcJzd9WEAZn/ql8ydglgpSrumWH+yaOJcs4Q7hkgkki9dYnRu92ng49Zm0bh1LoRk5sqOkRvGn SAqEptPbg+aHOwRui5r7bkfoVoH3WyZwvIkXGWe1Med3J0xpQB/+ueVhAZHSJBYusdebD2fvyLdt9 ls2DgbKNQTYNWq06zMj2a3gmaBxEEI/+jgxqnIM4kAex0YaoS5WExOja4bZu2TUWm5rTcpjX1TEya 8UnHeawTUAATIygs2XpzKdKGse9zBGmLyHCuI+69jwpHuQVpTCzFk0cthDKqmz2J1mXubqE6iSS2d MDz+TXJubrTaJAcmDaewvw==; Original-Received: from [87.69.77.57] (port=3265 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9nWS-0004N5-4l; Fri, 08 Jul 2022 08:55:53 -0400 In-Reply-To: <87sfnb3h5m.fsf@disroot.org> (message from Akib Azmain Turja on Fri, 08 Jul 2022 18:47:33 +0600) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291957 Archived-At: > From: Akib Azmain Turja > Date: Fri, 08 Jul 2022 18:47:33 +0600 > > In some parts of the C source, preprocessor conditionals are commented > like the following: > > --8<---------------cut here---------------start------------->8--- > #ifdef FOO > ... > #else /* not FOO */ > ... > #endif /* FOO */ > --8<---------------cut here---------------end--------------->8--- > > I became confused at the first glance. But after seeing like the > following in some other part: > > --8<---------------cut here---------------start------------->8--- > #ifdef FOO > ... > #else /* not FOO */ > ... > #endif /* not FOO */ > --8<---------------cut here---------------end--------------->8--- > > I became even more confused. Why it's inconsistent? You mean, the comment for the #endif line? It doesn't really matter how you comment that, because both comments tell the same: the #ifdef'ed conditional block ends here. The differences in this case are purely stylistic. > Should I follow the GNU coding standards (the second one)? Yes, please.