Re: Windows build warnings

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build warnings
Date: 2021-11-26 20:14:05
Message-ID: 5AD45C74-031B-4DB3-A72F-18E074076C5F@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 26 Nov 2021, at 20:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 11/26/21 04:12, Daniel Gustafsson wrote:
>>> On 26 Nov 2021, at 05:45, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>>> Personally I'm not really in favour of outright disabling the C4101
>>>>> warning on Windows, because I think it is a useful warning for
>>>>> Postgres developers on Windows for cases unrelated to the use of
>>>>> PG_USED_FOR_ASSERTS_ONLY.
>
> [ FTR, that text is not mine; somebody messed up the attribution ]

That was probably me fat-fingering it, sorry.

>> I agree with Tom. I don't think we should disable the warning. If we
>> can't come up with a reasonable implementation of
>> PG_USED_FOR_ASSERTS_ONLY that works with MSVC we should just live with
>> the warnings. It's not like we get flooded with them.
>
> I think our policy is to suppress unused-variable warnings if they
> appear on current mainstream compilers; and it feels a little churlish
> to deem MSVC non-mainstream. So I stick with my previous suggestion,
> which basically was to disable C4101 until such time as somebody can
> make PG_USED_FOR_ASSERTS_ONLY work correctly on MSVC. In the worst
> case, that might lead a Windows-based developer to submit a patch that
> draws warnings elsewhere ... but the cfbot, other developers, or the
> buildfarm will find such problems soon enough.

I agree with that, and can go make that happen.

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2021-11-26 20:37:32 Unifying VACUUM VERBOSE and log_autovacuum_min_duration output
Previous Message Thomas Munro 2021-11-26 20:11:21 Re: Parallel Full Hash Join