Re: Make #else/#endif comments more consistent - Mailing list pgsql-hackers

From Anton Voloshin
Subject Re: Make #else/#endif comments more consistent
Date
Msg-id 8eee42fd-a2a0-aaec-7fbc-cffc14de8034@postgrespro.ru
Whole thread Raw
In response to Re: Make #else/#endif comments more consistent  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List 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




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: patch: Add missing descriptions for rmgr APIs
Next
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: patch: Add missing descriptions for rmgr APIs