[Top][All Lists]

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

Re: [C source] Inconsistent comments on preprocessor conditionals

From: Akib Azmain Turja
Subject: Re: [C source] Inconsistent comments on preprocessor conditionals
Date: Fri, 08 Jul 2022 19:55:05 +0600

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Sat, 09 Jul 2022 01:33:26 +1200
>> From: Phil Sainty <psainty@orcon.net.nz>
>> Cc: Akib Azmain Turja <akib@disroot.org>, emacs-devel@gnu.org
>> 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
> No, it doesn't, because the conditional could start with #ifndef
> instead.

Then we can do like the following:

--8<---------------cut here---------------start------------->8---
#ifndef FOO
#else /* not !FOO */
#endif /* not !FOO */
--8<---------------cut here---------------end--------------->8---

Very confusing though.

Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

Attachment: signature.asc
Description: PGP signature

reply via email to

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