Re: Fixing MSVC's inability to detect elog(ERROR) does not return

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: David Rowley <dgrowleyml@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-24T11:02:57Z
Lists: pgsql-hackers
On 24.07.25 03:14, David Rowley wrote:
> So, I think that means we can adjust the meson build scripts to pass
> /std:c11 when building in MSVC. The attached patch does this and
> defines a pg_builtin_constant() macro and adjusts ereport_domain() to
> use it.

Please review my patch at

https://www.postgresql.org/message-id/ccb273c9-7544-4748-8638-30feba212e6e@eisentraut.org
https://commitfest.postgresql.org/patch/5934/

for C11 support across all platforms.  Then we avoid the hybrid C99/C11 
situation that your patch introduces.




Commits

  1. Rename pg_builtin_integer_constant_p to pg_integer_constant_p

  2. Teach MSVC that elog/ereport ERROR doesn't return