Commit 92354dc7 by Jason Merrill Committed by Jason Merrill

PR c++/71209 - wrong error with dependent base

	* typeck.c (finish_class_member_access_expr): Avoid "not a base"
	warning when there are dependent bases.

From-SVN: r237558
parent 4e53aa97
2016-06-17 Jason Merrill <jason@redhat.com>
PR c++/71209
* typeck.c (finish_class_member_access_expr): Avoid "not a base"
warning when there are dependent bases.
2016-06-17 Jakub Jelinek <jakub@redhat.com>
* semantics.c (handle_omp_array_sections_1): Don't ICE when
......
......@@ -2797,6 +2797,8 @@ finish_class_member_access_expr (cp_expr object, tree name, bool template_p,
return error_mark_node;
if (!access_path)
{
if (any_dependent_bases_p (object_type))
goto dependent;
if (complain & tf_error)
error ("%qT is not a base of %qT", scope, object_type);
return error_mark_node;
......
// PR c++/71209
struct A {
int table_clear;
};
template <typename T>
struct B : T {
B() { this->A::table_clear; }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment