[Bug c++/57709] -Wshadow is too strict / has false positives
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 9 09:47:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list