From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Masahiko Sawada <msawada(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: pg_logicalinspect: Fix possible crash when passing a directory p |
Date: | 2025-03-13 08:33:55 |
Message-ID: | dc9665a8-987a-443d-ab18-f9865d21d034@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On 12.03.25 09:37, David Rowley wrote:
> On Wed, 12 Mar 2025 at 21:15, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>>
>> On 12.03.25 03:08, David Rowley wrote:
>>> This introduces a new compiler warning for compilers that don't know
>>> the ereport(ERROR) does not return.
>>
>> Which compiler is that?
>
> C:\Users\drowley\pg_src>cl
> Microsoft (R) C/C++ Optimizing Compiler Version 19.43.34808 for x64
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> I suspect drongo will also show the same warning once it runs on the
> latest commit shortly.
Ok, this is weird, because we have pg_unreachable() support for MSVC:
#if defined(HAVE__BUILTIN_UNREACHABLE) && !defined(USE_ASSERT_CHECKING)
#define pg_unreachable() __builtin_unreachable()
#elif defined(_MSC_VER) && !defined(USE_ASSERT_CHECKING)
#define pg_unreachable() __assume(0)
#else
#define pg_unreachable() abort()
#endif
Is there a way to reshuffle those conditionals to make this actually do
something useful on MSVC?
Are you compiling with assertions on in this case? Does anything change
about this if you don't use assertions (or vice versa)?
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-03-13 11:47:13 | pgsql: pg_noreturn to replace pg_attribute_noreturn() |
Previous Message | Richard Guo | 2025-03-13 07:36:21 | pgsql: Remove code setting wrap_non_vars to true for UNION ALL subqueri |