This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57709] -Wshadow is too strict / has false positives
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Jun 2015 09:47:48 +0000
- Subject: [Bug c++/57709] -Wshadow is too strict / has false positives
- Auto-submitted: auto-generated
- References: <bug-57709-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57709
--- Comment #16 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Gael Guennebaud from comment #15)
> -Wshadow still trigger false positive when a base member functions is
> imported with the "using" keyword, as in the following example (tested with
> gcc 5.1):
Please open a new PR. This one is fixed.
> Note that clang does not warn in this case, so it should be possible to
> figure out that in this case, the imported "size" symbol is a function and
> not a variable.
Sure, probably TREE_CODE (member) != FUNCTION_DECL but there must be a way to
check that it does represent a function_decl (or member-function). Run gcc
under gdb in your testcase and break at the call to warning_at and use "p
debug_tree(member)" to understand what member is in your testcase.