aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 951faf4..6b661bd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-26 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/32111
+ * decl.c (grokdeclarator): Reset friendp for member functions declared
+ friend of their own class.
+
2007-06-23 Mark Mitchell <mark@codesourcery.com>
* decl2.c (determine_visibility): Don't look for dllexport here.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 33f1c2a..7d4123f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8057,7 +8057,10 @@ grokdeclarator (const cp_declarator *declarator,
if (ctype == current_class_type)
{
if (friendp)
- pedwarn ("member functions are implicitly friends of their class");
+ {
+ pedwarn ("member functions are implicitly friends of their class");
+ friendp = 0;
+ }
else
pedwarn ("extra qualification %<%T::%> on member %qs",
ctype, name);