Re: Windows build warnings

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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 18:23:09
Message-ID: ca3d14ea-1a03-3a9a-383d-d8f56b10e25e@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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.
> I'm not sure I find it useful, as the only reason I *think* I know what it's
> doing is through trial and error. The only warnings we get from a tree where
> PG_USED_FOR_ASSERTS_ONLY clearly does nothing, are quite uninteresting and
> fixing them only amounts to silencing the compiler and not improving the code.
>

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.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-11-26 18:26:39 Re: rand48 replacement
Previous Message Parth Shah 2021-11-26 17:43:38 Contributing