diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/using2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/using2.C | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/testsuite/g++.dg/template/using2.C b/gcc/testsuite/g++.dg/template/using2.C index 6dd9ef46ce7..5987254d432 100644 --- a/gcc/testsuite/g++.dg/template/using2.C +++ b/gcc/testsuite/g++.dg/template/using2.C @@ -7,24 +7,25 @@ template <class T> struct Foo { - int i; // { dg-error "Foo" } + int i; }; struct Baz { - int i; // { dg-error "Baz" } + int i; }; template <class T> -struct Bar : public Foo<T>, Baz { - using Foo<T>::i; - using Baz::i; +struct Bar : public Foo<T>, Baz +{ + using Foo<T>::i; // { dg-message "previous declaration" } + using Baz::i; // { dg-error "redeclaration" } - int foo () { return i; } // { dg-error "request for member" } + int foo () { return i; } }; void foo (Bar<int> &bar) { - bar.foo(); // { dg-message "required" } + bar.foo(); } |