aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-02-02 00:04:13 +0000
committerJeff Law <law@gcc.gnu.org>1998-02-01 17:04:13 -0700
commita703fb388ba235e449aad17c618d50fe48a03812 (patch)
tree420be67f33cf5a55fab47f8908be1b9617e6e46d /gcc/cp/friend.c
parentceb6edf2498ce4a8714e90f48d9ff2ba66af059a (diff)
downloadgcc-a703fb388ba235e449aad17c618d50fe48a03812.zip
gcc-a703fb388ba235e449aad17c618d50fe48a03812.tar.gz
gcc-a703fb388ba235e449aad17c618d50fe48a03812.tar.bz2
Various fixes for -Wall problems from Kaveh. See ChangeLog for details.
From-SVN: r17586
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 28c0bb4..7263e64 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -195,14 +195,16 @@ add_friends (type, name, friend_type)
while (friends && TREE_PURPOSE (friends) != friend_type)
friends = TREE_CHAIN (friends);
if (friends)
- if (friend_type)
- warning ("method `%s::%s' is already a friend of class",
- TYPE_NAME_STRING (friend_type),
- IDENTIFIER_POINTER (name));
- else
- warning ("function `%s' is already a friend of class `%s'",
- IDENTIFIER_POINTER (name),
- IDENTIFIER_POINTER (DECL_NAME (typedecl)));
+ {
+ if (friend_type)
+ warning ("method `%s::%s' is already a friend of class",
+ TYPE_NAME_STRING (friend_type),
+ IDENTIFIER_POINTER (name));
+ else
+ warning ("function `%s' is already a friend of class `%s'",
+ IDENTIFIER_POINTER (name),
+ IDENTIFIER_POINTER (DECL_NAME (typedecl)));
+ }
else
TREE_VALUE (list) = tree_cons (friend_type, NULL_TREE,
TREE_VALUE (list));