From c2aa8dc92665461b3a02d22db401f5736b0a1d43 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 14 Apr 2011 11:00:24 -0400 Subject: [PATCH] parser.c (cp_parser_postfix_expression): Fix flags passed to build_new_method_call. * parser.c (cp_parser_postfix_expression): Fix flags passed to build_new_method_call. * semantics.c (finish_call_expr): Likewise. From-SVN: r172435 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/parser.c | 3 ++- gcc/cp/semantics.c | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 64ea98e1feb..33502e5dab6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2011-04-14 Jason Merrill + * parser.c (cp_parser_postfix_expression): Fix flags passed to + build_new_method_call. + * semantics.c (finish_call_expr): Likewise. + PR c++/48531 * init.c (build_value_init_noctor): Check complain consistently. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 17f5850f894..7ffa8ba2a32 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -5054,7 +5054,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, = (build_new_method_call (instance, fn, &args, NULL_TREE, (idk == CP_ID_KIND_QUALIFIED - ? LOOKUP_NONVIRTUAL : LOOKUP_NORMAL), + ? LOOKUP_NORMAL|LOOKUP_NONVIRTUAL + : LOOKUP_NORMAL), /*fn_p=*/NULL, tf_warning_or_error)); } diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c763f813c5c..738375cf031 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2114,7 +2114,8 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual, result = build_new_method_call (object, fn, args, NULL_TREE, (disallow_virtual - ? LOOKUP_NONVIRTUAL : 0), + ? LOOKUP_NORMAL|LOOKUP_NONVIRTUAL + : LOOKUP_NORMAL), /*fn_p=*/NULL, complain); } -- 2.30.2