summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error2.C')
-rw-r--r--gcc/testsuite/g++.dg/other/error2.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error2.C b/gcc/testsuite/g++.dg/other/error2.C
new file mode 100644
index 000000000..36089e4b5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/error2.C
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 26 Dec 2001 <nathan@nathan@codesourcery.com>
+
+// PR 196. Misleading diagnostic
+
+namespace N
+{
+ class B { friend void operator>>(int, class B); };
+ class N { friend void operator>>(int,class N); };
+}
+void N::operator>>(int, N::B) // { dg-error "N::N::B|N::operator>>" }
+{ }