PR c++/59366
commitb97c3ba6c203749037c99a16ec94966247608bbc
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jan 2015 21:02:15 +0000 (15 21:02 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jan 2015 21:02:15 +0000 (15 21:02 +0000)
treeb986595b92e98bfac8ddd733fa895f37db151c48
parent56568d5072ff5f344e3cc2cd9a82dc75dbd4b6c3
PR c++/59366
* name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
and function templates, declared only in the class.
* decl.c (duplicate_decls): Reveal hidden friend functions or
function templates, if they are redeclared outside the class.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219689 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/name-lookup.c
gcc/testsuite/g++.dg/template/friend57.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/friend5.C