Re: Make #else/#endif comments more consistent

From: Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make #else/#endif comments more consistent
Date: 2022-08-29 12:27:18
Message-ID: 8eee42fd-a2a0-aaec-7fbc-cffc14de8034@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29/08/2022 14:50, Peter Eisentraut wrote:
> I usually try to follow the guidelines in
> <https://www.gnu.org/prep/standards/html_node/Comments.html>, which
> pretty much match what you are proposing.

Thank you for the link, it's a useful one and the wording is better than
mine.

> Note that for _MSC_VER in particular there is some trickiness: We
> generally use it to tell apart different MSVC compiler versions.

That's certainly true in branches <= 15, but in master, to my surprise,
I don't see any numerical comparisons of _MSC_VER since the recent
6203583b7.

I'm not sure explicit !defined(_MSC_VER) is all that more clear
than !_MSC_VER in the commentary. After all, we would probably
never (?) see an actual
#if (!_MSC_VER)
in a real code.

So I have mixed feelings on forcing define() on _MSC_VER, but if you
insist, I don't mind much either way.

What about other changes? Are there any obviously wrong or missed ones?

--
Anton Voloshin
Postgres Professional, The Russian Postgres Company
https://postgrespro.ru

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message kuroda.hayato@fujitsu.com 2022-08-29 12:49:22 RE: patch: Add missing descriptions for rmgr APIs
Previous Message Amit Kapila 2022-08-29 12:11:00 Re: patch: Add missing descriptions for rmgr APIs