summaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 14fc5d0b267..e107ceea494 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -329,7 +329,8 @@ make_friend_class (tree type, tree friend_type, bool complain)
{
error ("%qT is not a member class template of %qT",
name, ctype);
- inform (input_location, "%q+D declared here", decl);
+ inform (DECL_SOURCE_LOCATION (decl),
+ "%qD declared here", decl);
return;
}
if (!template_member_p && (TREE_CODE (decl) != TYPE_DECL
@@ -337,7 +338,8 @@ make_friend_class (tree type, tree friend_type, bool complain)
{
error ("%qT is not a nested class of %qT",
name, ctype);
- inform (input_location, "%q+D declared here", decl);
+ inform (DECL_SOURCE_LOCATION (decl),
+ "%qD declared here", decl);
return;
}