]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.other/friend4.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / friend4.C
diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend4.C b/gcc/testsuite/g++.old-deja/g++.other/friend4.C
deleted file mode 100644 (file)
index 07969cd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Build don't link:
-
-// by Alexandre Oliva <oliva@dcc.unicamp.br>
-
-// I'm not 100% sure this program is correct, but g++ shouldn't just
-// crash.
-
-// The idea is to give privileged access to bar<A> only to
-// specializations foo<A,B>, for all B.
-
-template <class A, class B> void foo();
-template <class C> class bar {
-  int i; // ERROR - private
-  template <class B> friend void foo<C,B>(); // ERROR - bogus declaration
-};
-template <class A, class B> void foo() {
-  bar<A> baz; baz.i = 1;   // ERROR - foo cannot access bar<int>::i
-  bar<int> buz; buz.i = 1; // ERROR - foo cannot access bar<int>::i
-}
-int main() {
-  foo<void,void>();
-  foo<int,void>();
-}