diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2005-10-18 16:20:55 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2005-10-18 16:20:55 +0000 |
commit | 6d2989e11752934162a82ed4718298f3f8a47bfe (patch) | |
tree | e0d29138a0ec4f4daa1df0f1faa9074d14b7041d /gcc/testsuite | |
parent | 685e39c289c014c395367c0146e51225e0521b31 (diff) | |
download | gcc-6d2989e11752934162a82ed4718298f3f8a47bfe.zip gcc-6d2989e11752934162a82ed4718298f3f8a47bfe.tar.gz gcc-6d2989e11752934162a82ed4718298f3f8a47bfe.tar.bz2 |
re PR c++/22293 (ICE declaring destructor as friend)
PR c++/22293
* decl.c (grokdeclarator): Reject unqualified destructors in
friend declarations.
* g++.dg/other/friend3.C: New test.
From-SVN: r105564
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/friend3.C | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f212358..6ba9056 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR c++/22293 + * g++.dg/other/friend3.C: New test. + 2005-10-18 Mark Mitchell <mark@codesourcery.com> PR c++/23293 diff --git a/gcc/testsuite/g++.dg/other/friend3.C b/gcc/testsuite/g++.dg/other/friend3.C new file mode 100644 index 0000000..ce872e5 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/friend3.C @@ -0,0 +1,13 @@ +// PR c++/22293 +// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de> +// { dg-do compile } + +struct A +{ + friend ~A(); // { dg-error "qualified name" } +}; + +struct B +{ + friend ~A(); // { dg-error "qualified name" } +}; |