mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 13:35:24 +08:00
re PR c++/9602 (Total confusion about template/friend/virtual/abstract)
PR c++/9602 * typeck2.c (abstract_virtuals_error): Don't check when TYPE is still template parameter dependent. * g++.dg/template/friend16.C: New test. From-SVN: r63362
This commit is contained in:
parent
44ee6e9e62
commit
9e236a9d66
@ -1,3 +1,9 @@
|
|||||||
|
2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
|
PR c++/9602
|
||||||
|
* typeck2.c (abstract_virtuals_error): Don't check when
|
||||||
|
TYPE is still template parameter dependent.
|
||||||
|
|
||||||
2003-02-23 Mark Mitchell <mark@codesourcery.com>
|
2003-02-23 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
PR c++/5333
|
PR c++/5333
|
||||||
|
@ -143,6 +143,11 @@ abstract_virtuals_error (decl, type)
|
|||||||
CLASSTYPE_PURE_VIRTUALS holds the inline friends. */
|
CLASSTYPE_PURE_VIRTUALS holds the inline friends. */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (dependent_type_p (type))
|
||||||
|
/* For a dependent type, we do not yet know which functions are pure
|
||||||
|
virtuals. */
|
||||||
|
return 0;
|
||||||
|
|
||||||
u = CLASSTYPE_PURE_VIRTUALS (type);
|
u = CLASSTYPE_PURE_VIRTUALS (type);
|
||||||
if (decl)
|
if (decl)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
|
PR c++/9602
|
||||||
|
* g++.dg/template/friend16.C: New test.
|
||||||
|
|
||||||
2003-02-23 Mark Mitchell <mark@codesourcery.com>
|
2003-02-23 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
PR c++/5333
|
PR c++/5333
|
||||||
|
16
gcc/testsuite/g++.dg/template/friend16.C
Normal file
16
gcc/testsuite/g++.dg/template/friend16.C
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// { dg-do compile }
|
||||||
|
|
||||||
|
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
|
||||||
|
|
||||||
|
// PR c++/9602: Inline friend/pure virtual tree data sharing in
|
||||||
|
// class template.
|
||||||
|
|
||||||
|
template <typename T> struct X {
|
||||||
|
void foo (X);
|
||||||
|
friend void bar () {}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void X<T>::foo (X x) {}
|
||||||
|
|
||||||
|
template struct X<int>;
|
Loading…
Reference in New Issue
Block a user