From: Nick Clifton Date: Tue, 15 May 2001 07:55:53 +0000 (+0000) Subject: Add new test - do not warn about (non-)redundant friend declaration. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5be598f65e965b63d1e7b209ba77965b848c61a6;p=gcc.git Add new test - do not warn about (non-)redundant friend declaration. From-SVN: r42105 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2f2aac12f54..e003fe14c95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2001-05-15 Nick Clifton + + * g++.dg/friend-warn.C: New test. Do not warn about friend + declaration being redundant. + 2001-05-15 Mark Mitchell (admin) * 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 index 00000000000..e7982896a92 --- /dev/null +++ b/gcc/testsuite/g++.dg/friend-warn.C @@ -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);