aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2000-09-12 20:59:16 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-09-12 20:59:16 -0400
commit634dd0ca7756a22847e2327b6270792cbd042495 (patch)
treef02b6527875811312c8f7e5308790b297fd3f844
parent5c80f6e6b1be7ad5fc64b015e87ee44896595ae6 (diff)
downloadgcc-634dd0ca7756a22847e2327b6270792cbd042495.zip
gcc-634dd0ca7756a22847e2327b6270792cbd042495.tar.gz
gcc-634dd0ca7756a22847e2327b6270792cbd042495.tar.bz2
new
From-SVN: r36381
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/inherit2.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/inherit2.C b/gcc/testsuite/g++.old-deja/g++.pt/inherit2.C
new file mode 100644
index 0000000..46637a1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/inherit2.C
@@ -0,0 +1,20 @@
+// Test that we warn about unqualified references to implicit typenames.
+// Bug: g++ is confused by the binding for ::AN and crashes.
+// Special g++ Options:
+// crash test - XFAIL *-*-*
+
+template <class T> struct A {
+ struct AA { };
+ struct AB { };
+ struct AC { };
+};
+
+template <class T> struct B: public A<T> {
+ friend struct B::AA; // OK
+ friend AB; // WARNING - needs class-key
+ friend struct AC; // WARNING - refers to ::AC
+};
+
+B<int> b;
+
+int main () { }