public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: David Rowley <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: pg_logicalinspect: Fix possible crash when passing a directory p
Date: Thu, 17 Jul 2025 00:20:30 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvp-WCUTDU767Lpjw3m698gS+mCrNAnTEppZiXixneVxGQ@mail.gmail.com>
References: <[email protected]>
	<CAApHDvqrhFfnetbcwgGkJ=z63T8HfQ_OyP=vX8BYiXyxFKt67w@mail.gmail.com>
	<[email protected]>
	<CAApHDvqf4tKwE0oP8ybL2Eu-SD=C34pdZ9vVDSJwvqDXi88nUg@mail.gmail.com>
	<[email protected]>
	<CAApHDvrFdXjbrV6KCx_GHKYSufUbNDYSsjppcJQiGOURfJE6qg@mail.gmail.com>
	<[email protected]>
	<CAApHDvoOnd4PBNV0qyJVLmbWvWUjztzcMH5xY2AGp5Vov6XU3Q@mail.gmail.com>
	<[email protected]>
	<CAApHDvp-WCUTDU767Lpjw3m698gS+mCrNAnTEppZiXixneVxGQ@mail.gmail.com>

David Rowley <[email protected]> writes:
> On Thu, 17 Jul 2025 at 15:19, Tom Lane <[email protected]> wrote:
>> Hmph.  I doubt we are ready to require C11 everywhere, but maybe
>> we could require it in MSVC builds?  Which MSVC versions would
>> that eliminate?

> Going by [1] it's Visual Studio 2019, which as of 8fd9bb1d9 is now our
> minimum supported VS version.

Hmm, so apparently no cost ... also, if I'm getting this right,
the only downside of compiling with an older compiler would be
seeing a lot of "possibly-uninitialized" warnings.

> I hacked up a quick patch (attached) which compiles without any
> warnings.  Tested on VS2012 with meson setup -Dc_std=c11.

Personally I'd think about providing a definition of
__builtin_constant_p rather than changing elog.h; but we'd
end up at the same place.

> Unsure what other repercussions there are of compiling with C11 and
> have not looked into what it would take to adjust the meson build
> scripts to default to that for MSVC builds.

In theory there should be no repercussions, because we already
support compiling with C11: C99 is a minimum not a maximum.

But I've not checked the meson scripts either.

			regards, tom lane





view thread (16+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgsql: pg_logicalinspect: Fix possible crash when passing a directory p
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox