pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Dmitry Mityugov <d.mityugov@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org
Subject: Re: patch: Use pg_assume in jsonb_util.c to fix GCC 15 warnings
Date: Sat, 12 Jul 2025 14:04:53 -0400
Message-ID: <85365.1752343493@sss.pgh.pa.us> (raw)
In-Reply-To: <ib5yhkzseb27icjpz5p6wqgppaoa2nhjzj3ldx23d65ehciwin@um6dx2bpxux3>
References: <0c623e8a204187b87b4736792398eaf1@postgrespro.ru>
	<82868.1752342174@sss.pgh.pa.us>
	<ib5yhkzseb27icjpz5p6wqgppaoa2nhjzj3ldx23d65ehciwin@um6dx2bpxux3>

Andres Freund <andres@anarazel.de> writes:
> On 2025-07-12 13:42:54 -0400, Tom Lane wrote:
>> I don't care for this patch: replacing an Assert with pg_assume just
>> seems like a very bad idea.

> That shouldn't be a problem - pg_assume() is defined to be an Assert() in
> USE_ASSERT_CHECKING builds.

Ah, my bad.  But there's still the question of exactly what reasoning
the compiler is using to arrive at the conclusion that it need not
warn given these assertions, and whether we want to rely on that
reasoning not changing.  I'd prefer to simplify matters.

			regards, tom lane





view thread (14+ messages)  latest in thread

Message-ID: <85365.1752343493@sss.pgh.pa.us>
Permalink:  ../85365.1752343493@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/85365.1752343493@sss.pgh.pa.us

 · 

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, d.mityugov@postgrespro.ru
  Subject: Re: patch: Use pg_assume in jsonb_util.c to fix GCC 15 warnings
  In-Reply-To: <85365.1752343493@sss.pgh.pa.us>

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

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