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: Phil Sainty
Subject: Re: [C source] Inconsistent comments on preprocessor conditionals
Date: Sat, 09 Jul 2022 01:33:26 +1200
User-agent: Orcon Webmail

On 2022-07-09 00:55, Eli Zaretskii wrote:
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.

The "#endif /* not FOO */" version provides the extra information that
there *is* an "#else" clause -- which might be helpful if the clauses
are spaced very far apart.  If "#endif /* FOO */" is then consistently
used only for cases with no "#else", some code may be (very) slightly
easier for people to parse.

(As that was your recommended approach, this is nothing more than a
an observation supporting that preference.)




reply via email to

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