diff options
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 023ed87..e574c27 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -3421,6 +3421,12 @@ do_class_using_decl (tree scope, tree name) return NULL_TREE; } } + else if (name == ctor_identifier + && BINFO_INHERITANCE_CHAIN (BINFO_INHERITANCE_CHAIN (binfo))) + { + error ("cannot inherit constructors from indirect base %qT", scope); + return NULL_TREE; + } else if (!name_dependent_p) { decl = lookup_member (binfo, name, 0, false, tf_warning_or_error); |