]> gcc.gnu.org Git - gcc.git/commitdiff
Add new test - do not warn about (non-)redundant friend declaration.
authorNick Clifton <nickc@cambridge.redhat.com>
Tue, 15 May 2001 07:55:53 +0000 (07:55 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 15 May 2001 07:55:53 +0000 (07:55 +0000)
From-SVN: r42105

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

index 2f2aac12f54c10b3ea3ef543f0187ec2d8b1c361..e003fe14c959134071a51f8f7af725f26d175624 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);
This page took 0.087356 seconds and 5 git commands to generate.