public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Andres Freund <[email protected]>
Cc: [email protected]
Subject: Re: gcc 15 "array subscript 0" warning at level -O3
Date: Thu, 05 Jun 2025 15:50:48 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <brpeo76nq4sb3wqkwbfjmy2b6mz5zgyoshwmqcbkmmpja5ydia@iadpnczghsyq>
References: <[email protected]>
	<3prdb6hkep3duglhsujrn52bkvnlkvhc54fzvph2emrsm4vodl@77yy6j4hkemb>
	<brpeo76nq4sb3wqkwbfjmy2b6mz5zgyoshwmqcbkmmpja5ydia@iadpnczghsyq>

Andres Freund <[email protected]> writes:
>> I've been wondering about adding wrapping something like that in a
>> pg_assume(expr) or such.

> I've been once more annoyed by this warning. Here's a prototype for the
> approach outlined above.

Looks plausible by eyeball.  I did notice a typo in the comment:

+ * pg_assume(expr) stats that we assume `expr` to evaluate to true. In assert

s/stats/states/, I think you meant.

			regards, tom lane





view thread (150+ 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]
  Subject: Re: gcc 15 "array subscript 0" warning at level -O3
  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