Re: gcc 15 "array subscript 0" warning at level -O3
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: jian he <jian.universality@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2025-07-09T23:21:29Z
Lists: pgsql-hackers
Hi, On 2025-07-02 22:13:17 +0800, jian he wrote: > On Thu, Jun 5, 2025 at 3:00 AM Andres Freund <andres@anarazel.de> wrote: > > I've been once more annoyed by this warning. Here's a prototype for the > > approach outlined above. > > > > I can confirm the warning disappears when using gcc-14.0 compile > source code with the attached patch. > I didn't review it though. > I didn’t find this in the CommitFest, so I added an entry [1] to make sure it > doesn’t get forgotten... Thanks. Pushed it now and closed the CF entry. Greetings, Andres Freund
Commits
-
Use pg_assume() to avoid compiler warning below exec_set_found()
- 48a23f6eae71 19 (unreleased) landed
-
Add pg_assume(expr) macro
- d65eb5b1b84e 19 (unreleased) landed