From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: [C source] Inconsistent comments on preprocessor conditionals Date: Fri, 08 Jul 2022 20:57:19 +0800 Message-ID: <87fsjb4v9s.fsf@yahoo.com> References: <87sfnb3h5m.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39804"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) 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 15:04:38 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 1o9nev-000AC8-Te for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jul 2022 15:04:37 +0200 Original-Received: from localhost ([::1]:52804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9neu-0007bk-Kz for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jul 2022 09:04:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9nY2-00031z-RO for emacs-devel@gnu.org; Fri, 08 Jul 2022 08:57:30 -0400 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]:39238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9nY1-00034Q-4s for emacs-devel@gnu.org; Fri, 08 Jul 2022 08:57:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657285047; bh=+DGKz4IFQanpMa0+u6m81uluIIiw1+3gH969IzAeoZE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=pmUkqciK2lWu5y4x6KI9nasxlolck8PuVb04XGKlfocwByAV6+KsyNZ3AaEwnnefmL7IAm/CckIsh+8QI3i8JrW07osfN6D0oBSYzQPtZAI7CRufV9+LS2CfTmDo2Sy8ku5UmypS2wuW2PSwdB2UxIobZinOoIroG9sGDoHwMD/UNhPh/pm8jsvKi5GXziDEOMtXe+VKCV/SIIGwapKnwlc5xcZaH529dgFxElTUjwNnC5RynzTI6WU25u50/cvD+RFvrakaqGWD0fMeT0MVOVUwDAPRFyQlV7pxpZtasQxIfXkNwaem8if9BmnFrADEwTevx5CEbUSATVjIYrNAlw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657285047; bh=sZsw3JFnICyLr1v9XQC8S6A7tagID3JTBp9K7aXDLAp=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ieTe2fJ8TQ4pwc0NbCR4J+5EKEhhGZS/zWU7w+d7d5VKZBN/BSQ07La9I98E5Rr3gpyM4m08Q6fvxQV+84xFfOntX/ZRPDuwLOPCTobYOWhXJLUR1f7GmngiHU6kypxKttBXFdpkFjDZcOr+MLc2WJB94MUuoNS1D7YZWXpay5j+NHUmhfq/fDY5W1FWtnjaQdt2w9Kfz1A+BTfeHVz9NkyGrGSy26Rx9suZkOZ2t3p5Upjrgi3O2nO7xVAXir9a3iyYbF0eSMIq+aOujvaJOWCSwnI4t0yap28633RGaZ49KHkKsynytNGsPrleJCprGLMCnOg0h5fgZpuiKFcuRw== X-YMail-OSG: 0fy38UkVM1kQkedpVF0FlATULdVVFHbyj2D18OOsKWMhtRlPdBPdLDV7lTpiMZo ksnjUUcGy9fWPfxzB30ue4Tm.r5jt0fWKRKl8djGscQ7Aa9OSoBw_CG06nrF0WoB_FwhZUnIgzkh 26uQ2mEotC12I8xtxGJPRz8FFy8Blj8RXsjiYrumag9FzFC7HiEuPDN.tTl9lX9ZfwyTgppMGmSK jIrnSd_8N5LKFJ2lS4PO5wnggbdM9szyWWPb6ZFfQV0UolStNRiSKHa_T5c4KF9Oy.ssdRIohBUm Als6kNgaUjLbmP_rCHcx6sJJZ9Rj.Elucs63_NnhNXGAtJ3XYnYX9yN9UyUh1.7.0nkvvyPsFTIR T2sCRisx2nJU439aaU9ta9_tQc1MzE._xz2lQuxYIzo5WyapnM1yngXtgxq83xlK69CVOS4ePkX6 9XunEcDv_Nb_vZZu1U5ZlD1EIaNQRNwHF7.0iC4WX._hIVY6R0i44yEL5GCqvJVs_7CQBki2k9wK STKz_bXcydtY4XT5FYcJUB6_TxjpTcpJfTu3KxE5iQV2XjQ87tJQcYzJ8YF_keUytb1wl6V1Xvno UZc4X._Ain0DY.tPJyMm31mbtMvhn9Lg.CQ1Zr7wqLmH1fkCS9LfN40E3aelEmq4flFcmIHe.kUo 5O5rgDf9eNwBgqZazdJ9weqofzbg0dXMmSc3SgYXhT_GQu174qX7Ndd6hiS8AuzlYuSSxFdMWkPb QK_0iDI6U3khhE6oU.qFKIbm1cC04KGSczZBoOA3CeEy6U4MRFwHjWR8_jVtsZt1fWSaB92VnsHP j_FThAijSXH86uro2KHKOTkqHXl0b3Agq.dKB74K9t X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Fri, 8 Jul 2022 12:57:27 +0000 Original-Received: by hermes--canary-production-sg3-67975bbd4b-hh5lh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3bf41856c8557d5319900a733c4d52de; Fri, 08 Jul 2022 12:57:23 +0000 (UTC) In-Reply-To: <87sfnb3h5m.fsf@disroot.org> (Akib Azmain Turja's message of "Fri, 08 Jul 2022 18:47:33 +0600") X-Mailer: WebService/1.1.20381 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-23.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:291958 Archived-At: Akib Azmain Turja writes: > In some parts of the C source, preprocessor conditionals are commented > like the following: > > #ifdef FOO > ... > #else /* not FOO */ > ... > #endif /* FOO */ > > > I became confused at the first glance. But after seeing like the > following in some other part: > > #ifdef FOO > ... > #else /* not FOO */ > ... > #endif /* not FOO */ > > I became even more confused. Why it's inconsistent? And what should I > do when adding new conditional blocks? Should I follow the GNU coding > standards (the second one)? They are optional, I think. I personally only write such comments when the code inside the conditional extends so long that what is inside the conditional is not immediately obvious.