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

From Peter Eisentraut
Subject Re: Make #else/#endif comments more consistent
Date
Msg-id 9111f9f3-0f77-785a-a933-eb62492714ca@enterprisedb.com
Whole thread Raw
In response to Make #else/#endif comments more consistent  (Anton Voloshin <a.voloshin@postgrespro.ru>)
Responses Re: Make #else/#endif comments more consistent
List pgsql-hackers
On 29.08.22 11:38, Anton Voloshin wrote:
> I propose making them more consistent. Would the following guidelines be 
> acceptable?

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.

> And this:
> #else                           /* !_MSC_VER */
> over
> #else                           /* !defined(_MSC_VER) */

Note that for _MSC_VER in particular there is some trickiness: We 
generally use it to tell apart different MSVC compiler versions.  But it 
is not present with MinGW.  So !_MSC_VER and !defined(_MSC_VER) have 
different meanings.  So in this particular case, more precision in the 
comments might be better.



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: pg_checksum: add test for coverage
Next
From: Amit Kapila
Date:
Subject: Re: Handle infinite recursion in logical replication setup