Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] -Wshadow


Benno wrote:

> My main work around for this was having function declarations in
> header files not specify the name of arguments, to avoid potential
> spurious clashes. However this means that I can't use doxygen, which
> relies on the name of arguments to document the functions.

Wouldn't it be better to just rename the function parameters?
I use indx instead in index all over the place.

Once you fix the warnings from the initial addition of -Wshadow
it rarely bites again and there is one more potential bug you
don't have to worry about.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam@xxxxxxxxxxxxx (Yes it's valid)
+-----------------------------------------------------------+
C++ : an octopus made by nailing extra legs onto a dog.