aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c7c063f..7b5a3e4 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -4447,7 +4447,13 @@ structural_type_p (tree t, bool explain)
if (TREE_PRIVATE (m) || TREE_PROTECTED (m))
{
if (explain)
- inform (location_of (m), "%qD is not public", m);
+ {
+ if (DECL_FIELD_IS_BASE (m))
+ inform (location_of (m), "base class %qT is not public",
+ TREE_TYPE (m));
+ else
+ inform (location_of (m), "%qD is not public", m);
+ }
return false;
}
if (!structural_type_p (TREE_TYPE (m)))