|
From: | Mike Miller |
Subject: | [Octave-bug-tracker] [bug #48493] Clear up "shadowed member" warnings |
Date: | Sun, 17 Jul 2016 04:45:04 +0000 (UTC) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 |
Follow-up Comment #9, bug #48493 (project octave): I think jwe is saying that we should start instituting a policy of trying to name all class member variables "m_foo" to avoid ambiguity with public member functions or other names. The patch that you have submitted here is all about renaming local variables and parameter names that shadow class member functions. In comment #7 I believe jwe is saying that he doesn't think these types of naming conflicts are problems worth fixing. And the GCC developers apparently agree which is why they have stopped emitting -Wshadow for exactly these situations. Your example concerns a parameter of type function pointer. This is still caught by the -Wshadow warning in GCC 6. If you look at the bug report I linked, GCC still warns for variables that are function pointers. The most common case of a simple variable that has the same name as a member function should not be a problem. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?48493> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |