Add new test - do not warn about (non-)redundant friend declaration.
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 May 2001 07:55:53 +0000 (07:55 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 May 2001 07:55:53 +0000 (07:55 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42105 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/friend-warn.C [new file with mode: 0644]

index 2f2aac1..e003fe1 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * g++.dg/friend-warn.C: New test.  Do not warn about friend
+       declaration being redundant.
+
 2001-05-15  Mark Mitchell (admin)  <mitchell@nunki.dbai.tuwien.ac.at>
 
        * gcc.dg/ultrasp2.c: Don't run it with -m64 on sparc-*-*.
diff --git a/gcc/testsuite/g++.dg/friend-warn.C b/gcc/testsuite/g++.dg/friend-warn.C
new file mode 100644 (file)
index 0000000..e798289
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options -Wredundant-decls } */
+
+/* Test to see if spurious warnings about redundant
+   declarations are emiited because of the friend
+   declaration.  */
+
+class Foo
+{
+   friend void bar (Foo);
+public:
+};
+
+extern void bar (Foo);