diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/qualttp21.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/qualttp21.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/qualttp21.C b/gcc/testsuite/g++.dg/template/qualttp21.C new file mode 100644 index 000000000..00fcf40c4 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/qualttp21.C @@ -0,0 +1,17 @@ +// Copyright (C) 2002 Free Software Foundation +// Contributed by Roger Sayle <roger@eyesopen.com> +// { dg-do compile } + +template <class A> +class foo { + int _foo; +public: + foo() {} +protected: + ~foo() {} // { dg-error "~foo" } +}; + +int main() +{ + foo<int> a; // { dg-error "context" } +} |