friend.c (do_friend): Remove check for existing decl.
authorNathan Sidwell <nathan@acm.org>
Wed, 24 May 2017 23:18:58 +0000 (23:18 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 24 May 2017 23:18:58 +0000 (23:18 +0000)
commit5ad4f1c81153459ce6fc8c285a39c69e060ac604
tree972e96ed5a394997a17ad54013af94cbed7ce7e7
parent6cdb26f2adc716bff0d7cc9c0682501da77c5be8
friend.c (do_friend): Remove check for existing decl.

cp/
* friend.c (do_friend): Remove check for existing decl.
* name-lookup.h (lookup_name_innermost_nonclass_level): Delete.
* name-lookup.c (push_local_binding): Directly look for binding.
(lookup_name_innermost_nonclass_level_1): Delete.
(lookup_name_innermost_nonclass_level): Delete.

testsuite/
* g++.dg/lookup/friend12.C: Adjust diagnostics.
* g++.dg/lookup/friend19.C: New.
* g++.dg/lookup/friend20.C: New.

From-SVN: r248435
gcc/cp/ChangeLog
gcc/cp/friend.c
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/friend12.C
gcc/testsuite/g++.dg/lookup/friend19.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lookup/friend20.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.jason/scoping12.C