Peter Eisentraut <[EMAIL PROTECTED]> writes: > I'm not sure what the point is anyway. Shadowing is perfectly > well-defined and I've never heard of a real problem because of it.
Well, shadowing a formal parameter with a local variable is most likely a mistake, and shadowing a local with a more-tightly-nested local is, if not an outright mistake, certain to confuse future maintainers. So I'd be in favor of getting rid of cases like that. I can't get excited about forbidding shadowing of globals by locals, though ... seems like that's practically giving up one of the advantages of having a block-structured language in the first place. BTW, what I find by experiment with gcc 2.95.3 is that local-shadowing-formal is warned of just with -Wall, if the local is declared at the function's outermost brace level, whether or not you say -Wshadow. So we already know we have none of those. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html