On Thu, 12 Sept 2024 at 14:03, Tom Lane <t...@sss.pgh.pa.us> 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 certainly, it was an easier
goal to achieve.

Looks like there are currently 47 warnings with -Wshadow=local. I'm
not quite sure what the definition of "compatible" is for this flag,
but looking at one warning in pgbench.c:4548, I see an int shadowing a
bool. So maybe -Wshadow=local is worthwhile.

David


Reply via email to