Re: Remove shadowed declaration warnings

2024-09-18 Thread Peter Eisentraut
On 12.09.24 04:25, David Rowley wrote: On Thu, 12 Sept 2024 at 14:03, Tom Lane wrote: I do grant that sometimes shadowing of locals can cause bugs. I don't recall right now why we opted for -Wshadow=compatible-local over -Wshadow=local, but we could certainly take another look at that. I don

Re: Remove shadowed declaration warnings

2024-09-11 Thread David Rowley
On Thu, 12 Sept 2024 at 14:03, Tom Lane wrote: > I do grant that sometimes shadowing of locals can cause bugs. I don't > recall right now why we opted for -Wshadow=compatible-local over > -Wshadow=local, but we could certainly take another look at that. I don't recall if it was discussed, but ce

Re: Remove shadowed declaration warnings

2024-09-11 Thread Tom Lane
David Rowley writes: > On Thu, 12 Sept 2024 at 12:33, Peter Smith wrote: >> I normally build the code with warnings enabled (specifically, >> -Wshadow) which exposes many "shadowed" declarations. > 0fe954c28 did add -Wshadow=compatible-local to the standard set of > complication flags. I felt i

Re: Remove shadowed declaration warnings

2024-09-11 Thread David Rowley
On Thu, 12 Sept 2024 at 12:33, Peter Smith wrote: > I normally build the code with warnings enabled (specifically, > -Wshadow) which exposes many "shadowed" declarations. > > It would be better to reduce warnings wherever it's easy to do so, > because if we always see/ignore lots of warnings then

Remove shadowed declaration warnings

2024-09-11 Thread Peter Smith
Hi, I normally build the code with warnings enabled (specifically, -Wshadow) which exposes many "shadowed" declarations. It would be better to reduce warnings wherever it's easy to do so, because if we always see/ignore lots of warnings then sooner or later something important may escape attentio