Subject: Re: [boost] Warning policy? local variable hides (i.e. shadows) global variable
From: Stephen Kelly (hello_at_[hidden])
Date: 2015-01-15 18:20:52
Beman Dawes wrote:
>> Normally, I'd dismiss such warnings as unwanted noise, but given Beman's
>> anecdotal evidence of the benefit of addressing them, I'm inclined to
>> agree that they should be addressed.
> It isn't just me; a quick search finds comments like "The clang
> -Wshadow warning is quite nice as code which trips it often has bugs
> due to accidentally referencing the wrong identically named variable"
> and a complaint Apple defaults to no shadow warnings.
I had to laugh that you pasted the text instead of a hyperlink to a location
on the information superhighway. :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk