PR g++/4476
* typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
testsuite:
PR g++/4476
* g++.dg/other/friend1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46226
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR g++/4476
+ * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
+
2001-10-11 Jason Merrill <jason_merrill@redhat.com>
* typeck2.c (store_init_value): Don't re-digest a bracketed
if (!CLASS_TYPE_P (type) || !CLASSTYPE_PURE_VIRTUALS (type))
return 0;
+ if (!TYPE_SIZE (type))
+ /* TYPE is being defined, and during that time
+ CLASSTYPE_PURE_VIRTUALS holds the inline friends. */
+ return 0;
+
u = CLASSTYPE_PURE_VIRTUALS (type);
if (decl)
{
+2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR g++/4476
+ * g++.dg/other/friend1.C: New test.
+
2001-10-11 Richard Henderson <rth@redhat.com>
* g++.old-deja/g++.other/crash18.C: Add -S to options.
--- /dev/null
+// { dg-do compile }
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 10 Oct 2001 <nathan@codesourcery.com>
+
+// Bug 4476. We tangled up inline friends and pure virtuals during
+// class definition.
+
+struct A {
+ friend void f () { }
+ void g (A a) { }
+};