Re: gcc 13 warnings

2024-07-15 Thread Aleksander Alekseev
Hi, > /* > * Prevent spurious warning due to compiler not realizing > * VARATT_IS_EXTERNAL_NON_EXPANDED() branch in assign_simple_var() > isn't > * reachable due to "found" being byvalue. > */ > if (var->datatype->typlen != 1) >

Re: gcc 13 warnings

2024-07-12 Thread Andres Freund
Hi, On 2024-07-05 14:19:12 +0300, Aleksander Alekseev wrote: > There is still a warning previously reported by Melanie: > > ``` > [1391/1944] Compiling C object src/pl/plpgsql/src/plpgsql.so.p/pl_exec.c.o > In file included from ../src/include/access/htup_details.h:22, > from ../s

Re: gcc 13 warnings

2024-07-05 Thread Aleksander Alekseev
Hi, > I have committed the change of buildtype to debugoptimized. There is still a warning previously reported by Melanie: ``` [1391/1944] Compiling C object src/pl/plpgsql/src/plpgsql.so.p/pl_exec.c.o In file included from ../src/include/access/htup_details.h:22, from ../src/pl

Re: gcc 13 warnings

2023-03-29 Thread Peter Eisentraut
On 22.03.23 10:45, Peter Eisentraut wrote: On 18.03.23 00:54, Andres Freund wrote: I think a good compromise would be buildtype=debugoptimized, which is -O2 with debug symbols, which also sort of matches the default in the autoconf world. Looks like that'd result in a slightly worse build wi

Re: gcc 13 warnings

2023-03-22 Thread Peter Eisentraut
On 18.03.23 00:54, Andres Freund wrote: I think a good compromise would be buildtype=debugoptimized, which is -O2 with debug symbols, which also sort of matches the default in the autoconf world. Looks like that'd result in a slightly worse build with msvc, as afaict we wouldn't end up with /OP

Re: gcc 13 warnings

2023-03-17 Thread Andres Freund
Hi, On 2023-03-17 09:06:05 +0100, Peter Eisentraut wrote: > AFAICT, the default for meson is buildtype=debug, which is -O0. The -O3 > comes from meson.build setting buildtype=release. Right - my point about -O3 was just that buildtype=release defaults to it. > I think a good compromise would b

Re: gcc 13 warnings

2023-03-17 Thread Tom Lane
Peter Eisentraut writes: > On 16.03.23 19:11, Andres Freund wrote: >> So I just elected to leave it at the default for meson. > AFAICT, the default for meson is buildtype=debug, which is -O0. The -O3 > comes from meson.build setting buildtype=release. > I think a good compromise would be build

Re: gcc 13 warnings

2023-03-17 Thread Peter Eisentraut
On 16.03.23 19:11, Andres Freund wrote: On 2023-03-16 13:54:29 -0400, Tom Lane wrote: Andres Freund writes: On 2023-03-16 12:10:27 -0400, Tom Lane wrote: It wouldn't be entirely surprising if meson is selecting some -W switches that the configure script doesn't ... but I don't know where to c

Re: gcc 13 warnings

2023-03-16 Thread John Naylor
On Fri, Mar 17, 2023 at 1:11 AM Andres Freund wrote: > On 2023-03-16 13:54:29 -0400, Tom Lane wrote: > So I just elected to leave it at the default for meson. In my build scripts I've been setting it to -O2, because that seemed the obvious thing to do, and assumed some later commit would get ri

Re: gcc 13 warnings

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 13:54:29 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2023-03-16 12:10:27 -0400, Tom Lane wrote: > >> It wouldn't be entirely surprising if meson is selecting some -W > >> switches that the configure script doesn't ... but I don't know > >> where to check or change that

Re: gcc 13 warnings

2023-03-16 Thread Tom Lane
Andres Freund writes: > On 2023-03-16 12:10:27 -0400, Tom Lane wrote: >> It wouldn't be entirely surprising if meson is selecting some -W >> switches that the configure script doesn't ... but I don't know >> where to check or change that. > I think it's just that meson defaults to -O3 (fwiw, I se

Re: gcc 13 warnings

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 10:05:06 -0700, Andres Freund wrote: > I think it's just that meson defaults to -O3 (fwiw, I see substantial gains of > that over -O2). I see such warnings with autoconf as well if I make it use > -O3. WRT: In file included from /home/andres/src/postgresql/src/include/access/

Re: gcc 13 warnings

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 12:10:27 -0400, Tom Lane wrote: > Pavel Stehule writes: > > čt 16. 3. 2023 v 16:43 odesílatel Tom Lane napsal: > >> 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 withou

Re: gcc 13 warnings

2023-03-16 Thread Tom Lane
Pavel Stehule writes: > čt 16. 3. 2023 v 16:43 odesílatel Tom Lane napsal: >> 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 did

Re: gcc 13 warnings

2023-03-16 Thread Pavel Stehule
čt 16. 3. 2023 v 16:43 odesílatel Tom Lane napsal: > Melanie Plageman writes: > > On Thu, Mar 16, 2023 at 9:40 AM Pavel Stehule > 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 als

Re: gcc 13 warnings

2023-03-16 Thread Tom Lane
Melanie Plageman writes: > On Thu, Mar 16, 2023 at 9:40 AM Pavel Stehule 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 gc

Re: gcc 13 warnings

2023-03-16 Thread Melanie Plageman
On Thu, Mar 16, 2023 at 9:40 AM Pavel Stehule wrote: > [1700/2287] Compiling C object src/pl/plpgsql/src/plpgsql.so.p/pl_exec.c.o > In file included from ../src/include/access/htup_details.h:22, > from ../src/pl/plpgsql/src/pl_exec.c:21: > In function ‘assign_simple_var’, > in

gcc 13 warnings

2023-03-16 Thread Pavel Stehule
Hi see [504/2287] Compiling C object src/backend/postgres_lib.a.p/access_transam_xlogrecovery.c.o In function ‘recoveryStopsAfter’, inlined from ‘PerformWalRecovery’ at ../src/backend/access/transam/xlogrecovery.c:1749:8: ../src/backend/access/transam/xlogrecovery.c:2737:42: warning: ‘recordX