David Rowley <dgrowleyml@gmail.com> writes:
> On Thu, 17 Jul 2025 at 15:19, Tom Lane <tgl@sss.pgh.pa.us> 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