Re: More weird compiler warnings

2023-03-16 Thread Andres Freund
On 2023-03-16 14:31:37 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-03-26 13:55:49 -0700, Andres Freund wrote: > >> On 2022-03-26 16:23:26 -0400, Tom Lane wrote: > >>> but I'm wondering if we could silence the warning by changing the loop > >>> condition to > >>> while (--nb >= 0) >

Re: More weird compiler warnings

2023-03-16 Thread Tom Lane
Andres Freund writes: > On 2022-03-26 13:55:49 -0700, Andres Freund wrote: >> On 2022-03-26 16:23:26 -0400, Tom Lane wrote: >>> but I'm wondering if we could silence the warning by changing the loop >>> condition to >>> while (--nb >= 0) >>> which seems like it might be marginally more readable a

Re: More weird compiler warnings

2023-03-16 Thread Andres Freund
Hi, On 2022-03-26 13:55:49 -0700, Andres Freund wrote: > On 2022-03-26 16:23:26 -0400, Tom Lane wrote: > > serinus' experimental gcc whines about a few places in network.c: > > > > ../../../../../pgsql/src/backend/utils/adt/network.c: In function 'inetnot': > > ../../../../../pgsql/src/backend/uti

Re: More weird compiler warnings

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 17:04:16 -0400, Tom Lane wrote: > Hmm, looks like the gcc folk aren't too sure either ;-). Heh, yea ;) > Okay, so we can change this code, or just do nothing and wait for > a repaired gcc. Since that's an unreleased version there's no > concern about any possible bug in-the-wi

Re: More weird compiler warnings

2022-03-26 Thread Tom Lane
Andres Freund writes: > On 2022-03-26 16:23:26 -0400, Tom Lane wrote: >> serinus' experimental gcc whines about a few places in network.c: > I reported this to the gcc folks, that's clearly a bug. I suspect that it > might not just cause spurious warnings, but also code generation issues - but >

Re: More weird compiler warnings

2022-03-26 Thread Andres Freund
Hi, On 2022-03-26 16:23:26 -0400, Tom Lane wrote: > serinus' experimental gcc whines about a few places in network.c: > > ../../../../../pgsql/src/backend/utils/adt/network.c: In function 'inetnot': > ../../../../../pgsql/src/backend/utils/adt/network.c:1893:34: warning: > writing 1 byte into a r

More weird compiler warnings

2022-03-26 Thread Tom Lane
serinus' experimental gcc whines about a few places in network.c: ../../../../../pgsql/src/backend/utils/adt/network.c: In function 'inetnot': ../../../../../pgsql/src/backend/utils/adt/network.c:1893:34: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 1893 |