From: Eli Zaretskii <eliz@gnu.org>
To: Akib Azmain Turja <akib@disroot.org>
Cc: emacs-devel@gnu.org
Subject: Re: [C source] Inconsistent comments on preprocessor conditionals
Date: Fri, 08 Jul 2022 15:55:52 +0300 [thread overview]
Message-ID: <8335fb4vc7.fsf@gnu.org> (raw)
In-Reply-To: <87sfnb3h5m.fsf@disroot.org> (message from Akib Azmain Turja on Fri, 08 Jul 2022 18:47:33 +0600)
> From: Akib Azmain Turja <akib@disroot.org>
> 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.
next prev parent reply other threads:[~2022-07-08 12:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 12:47 [C source] Inconsistent comments on preprocessor conditionals Akib Azmain Turja
2022-07-08 12:55 ` Eli Zaretskii [this message]
2022-07-08 13:33 ` Phil Sainty
2022-07-08 13:37 ` Eli Zaretskii
2022-07-08 13:55 ` Akib Azmain Turja
2022-07-08 14:01 ` Eli Zaretskii
2022-07-08 14:21 ` Phil Sainty
2022-07-08 16:28 ` Sergey Organov
2022-07-08 19:54 ` Stefan Monnier
2022-07-11 12:42 ` Akib Azmain Turja
2022-07-08 12:57 ` Po Lu
2022-07-08 13:47 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8335fb4vc7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=akib@disroot.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.