This is needed to recognize calls to known functions, otherwise such calls get erroneously handled by cp_build_function_call_vec.
gcc/cp/ChangeLog: * semantics.c (finish_call_expr): Strip any location wrapper from fn. --- gcc/cp/semantics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index dfdc458..f292d17 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2314,6 +2314,8 @@ finish_call_expr (tree fn, vec<tree, va_gc> **args, bool disallow_virtual, gcc_assert (!TYPE_P (fn)); + STRIP_ANY_LOCATION_WRAPPER (fn); + /* If FN may be a FUNCTION_DECL obfuscated by force_paren_expr, undo it so that we can tell this is a call to a known function. */ fn = maybe_undo_parenthesized_ref (fn); -- 1.8.5.3