This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37831] -Wshadow warns about variables inside classes member functions
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2008 01:51:29 -0000
- Subject: [Bug c++/37831] -Wshadow warns about variables inside classes member functions
- References: <bug-37831-102@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bangerth at dealii dot org 2008-10-15 01:51 -------
(In reply to comment #2)
> bar the function shadows bar the variable. I think the warning is correct.
> The variable _bar is not being taken into account at all.
Ah, bummer, I didn't even look close enough to see that the function and
its argument are named the same. Silly me, I just saw this piece of code
another project was unhappy about and thought I should submit this as a bug.
You're right, and I agree that the warning is valid.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37831