emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [C source] Inconsistent comments on preprocessor conditionals


From: Eli Zaretskii
Subject: Re: [C source] Inconsistent comments on preprocessor conditionals
Date: Fri, 08 Jul 2022 15:55:52 +0300

> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]