From: nickc Date: Tue, 15 May 2001 07:55:53 +0000 (+0000) Subject: Add new test - do not warn about (non-)redundant friend declaration. X-Git-Tag: upstream/4.9.2~94440 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c7407bc7ec67dae6c77965ed1782feeb80c73e3;p=platform%2Fupstream%2Flinaro-gcc.git Add new test - do not warn about (non-)redundant friend declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42105 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2f2aac1..e003fe1 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 0000000..e798289 --- /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);