From: Nathan Sidwell Date: Tue, 16 May 2017 16:15:47 +0000 (+0000) Subject: typeck2.c (cxx_incomplete_type_diagnostic): Revert change and check is_overloaded_fn. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c20c3b42c37a3dc64dddb9d3843bb2f640519def;p=gcc.git typeck2.c (cxx_incomplete_type_diagnostic): Revert change and check is_overloaded_fn. * typeck2.c (cxx_incomplete_type_diagnostic): Revert change and check is_overloaded_fn. From-SVN: r248119 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 16a6e4c7e2f..06bc8b67b6b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2017-05-16 Nathan Sidwell + + * typeck2.c (cxx_incomplete_type_diagnostic): Revert change and + check is_overloaded_fn. + 2017-05-16 Martin Liska * parser.c (cp_lexer_print_token): Add default value for flags @@ -58,7 +63,7 @@ (get_first_fn) Document. * typeck.c (cp_build_addr_expr_1): Pass arg directly to really_overloaded_fn. - * typeck2.c (cxx_inomplete_type_diagnostic): Use get_first_fn directly. + * typeck2.c (cxx_incomplete_type_diagnostic): Use get_first_fn directly. * cp-tree.h (SCOPE_DEPTH): New. * name-lookup.h (is_nested_namespace): Declare. diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index b469fdb7b28..ff445ca6a0e 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -506,7 +506,9 @@ cxx_incomplete_type_diagnostic (location_t loc, const_tree value, case OFFSET_TYPE: bad_member: { - tree member = get_first_fn (TREE_OPERAND (value, 1)); + tree member = TREE_OPERAND (value, 1); + if (is_overloaded_fn (member)) + member = get_first_fn (member); if (DECL_FUNCTION_MEMBER_P (member) && ! flag_ms_extensions)