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/g++.dg | |
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/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/other/friend3.C | 13 |
1 files changed, 13 insertions, 0 deletions
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" } +}; |