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.
gcc/testsuite/
2006-06-26 Simon Martin <simartin@users.sourceforge.net>
PR c++/32111
* g++.dg/other/friend5.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126006
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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);
+2006-06-26 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/32111
+ * g++.dg/other/friend5.C: New test.
+
2007-06-25 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32464
--- /dev/null
+/* PR c++/32111 */
+/* This used to ICE. */
+
+/* { dg-do "compile" } */
+
+struct A
+{
+ friend A::~A() {} /* { dg-error "implicitly friends of their class" } */
+};