Re: gcc 13 warnings

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-03-16T16:00:47Z
Lists: pgsql-hackers
čt 16. 3. 2023 v 16:43 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:

> Melanie Plageman <melanieplageman@gmail.com> writes:
> > On Thu, Mar 16, 2023 at 9:40 AM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
> >> ../src/include/varatt.h:230:36: warning: array subscript 0 is outside
> array bounds of ‘char[0]’ [-Warray-bounds=]
>
> > I see these with gcc 12.2.0 also.
>
> Hmm, I do not see any warnings on HEAD with Fedora 37's gcc 12.2.1.
> What non-default configure switches, CFLAGS, etc are you using?
>

meson build without any settings

I think so it is related to meson build, I didn't see these warnings with
autoconf

regards

Pavel



>
>                         regards, tom lane
>

Commits

  1. Use pg_assume() to avoid compiler warning below exec_set_found()

  2. Add pg_assume(expr) macro

  3. meson: Change default buildtype to debugoptimized