aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-08-08 11:32:21 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-08-08 11:32:21 -0400
commit712c948a074b0df50a1df6c5ce2d05acbd9ac972 (patch)
tree07a53c1a51ad5cafbce51e68ad7220bdea5e34e5 /gcc/cp
parent473b30ce95c6b3f41ced3bcc18fceb2c5f2ac466 (diff)
downloadgcc-712c948a074b0df50a1df6c5ce2d05acbd9ac972.zip
gcc-712c948a074b0df50a1df6c5ce2d05acbd9ac972.tar.gz
gcc-712c948a074b0df50a1df6c5ce2d05acbd9ac972.tar.bz2
re PR c++/50020 ([C++0x] internal compiler error range for in templated class)
PR c++/50020 * semantics.c (finish_call_expr): Don't look at 'this' if we had an explicit object argument. From-SVN: r177567
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8c1ecba..65a2701 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2011-08-08 Jason Merrill <jason@redhat.com>
+ PR c++/50020
+ * semantics.c (finish_call_expr): Don't look at 'this' if we
+ had an explicit object argument.
+
PR c++/50011
* typeck2.c (check_narrowing): Fix integer logic.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index aa62049..59b25e5 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2042,12 +2042,14 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual,
expressions with no type as being dependent. */
if (type_dependent_expression_p (fn)
|| any_type_dependent_arguments_p (*args)
- /* For a non-static member function, we need to specifically
+ /* For a non-static member function that doesn't have an
+ explicit object argument, we need to specifically
test the type dependency of the "this" pointer because it
is not included in *ARGS even though it is considered to
be part of the list of arguments. Note that this is
related to CWG issues 515 and 1005. */
- || (non_static_member_function_p (fn)
+ || (TREE_CODE (fn) != COMPONENT_REF
+ && non_static_member_function_p (fn)
&& current_class_ref
&& type_dependent_expression_p (current_class_ref)))
{