Re: gcc 15 "array subscript 0" warning at level -O3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gcc 15 "array subscript 0" warning at level -O3
Date
Msg-id 1317578.1749153048@sss.pgh.pa.us
Whole thread Raw
In response to Re: gcc 15 "array subscript 0" warning at level -O3  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> 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



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: add function for creating/attaching hash table in DSM registry
Next
From: Jeff Davis
Date:
Subject: Re: [19] Proposal: function markers to indicate collation/ctype sensitivity