re PR c++/6936 (member "using" binds wrong)
PR c++/6936 PR c++/25994 PR c++/26256 PR c++/30195 * search.c (lookup_field_1): Look through USING_DECL. (lookup_field_r): Call lookup_fnfields_slot instead of lookup_fnfields_1. * semantics.c (finish_member_declaration): Remove the check that prevents USING_DECLs from being verified by pushdecl_class_level. Call add_method for using declarations that designates functions if the using declaration is in a template class. Set DECL_IGNORED_P on class-scope using declarations. * typeck.c (build_class_member_access_expr): Handle USING_DECLs. * class.c (check_field_decls): Keep using declarations. (add_method): Remove two diagnostics about conflicting using declarations. * parser.c (cp_parser_nonclass_name): Handle USING_DECLs. * decl.c (start_enum): Call xref_tag whenever possible. * cp-tree.h (strip_using_decl): Declare, and reident the previous function. * name-lookup.c (strip_using_decl): New function. (supplement_binding_1): Call strip_using_decl on decl and bval. Perform most of the checks with USING_DECLs stripped. Also check that the target decl and the target bval does not refer to the same declaration. Allow pushing an enum multiple times in a template class. Adjustment to diagnose using redeclarations. Call diagnose_name_conflict. (push_class_level_binding): Call strip_using_decl on decl and bval. Perform most of the checks with USING_DECLs stripped. Return true if both decl and bval refer to USING_DECLs and are dependent. (diagnose_name_conflict): New function. From-SVN: r181359
Showing
- gcc/cp/ChangeLog 34 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/class.c 0 additions, 12 deletionsgcc/cp/class.c
- gcc/cp/cp-tree.h 2 additions, 1 deletiongcc/cp/cp-tree.h
- gcc/cp/decl.c 16 additions, 2 deletionsgcc/cp/decl.c
- gcc/cp/name-lookup.c 101 additions, 38 deletionsgcc/cp/name-lookup.c
- gcc/cp/parser.c 3 additions, 0 deletionsgcc/cp/parser.c
- gcc/cp/search.c 13 additions, 21 deletionsgcc/cp/search.c
- gcc/cp/semantics.c 22 additions, 2 deletionsgcc/cp/semantics.c
- gcc/cp/typeck.c 6 additions, 0 deletionsgcc/cp/typeck.c
- gcc/testsuite/ChangeLog 47 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/g++.dg/abi/mangle41.C 3 additions, 2 deletionsgcc/testsuite/g++.dg/abi/mangle41.C
- gcc/testsuite/g++.dg/cpp0x/forw_enum10.C 31 additions, 0 deletionsgcc/testsuite/g++.dg/cpp0x/forw_enum10.C
- gcc/testsuite/g++.dg/debug/using4.C 24 additions, 0 deletionsgcc/testsuite/g++.dg/debug/using4.C
- gcc/testsuite/g++.dg/debug/using5.C 23 additions, 0 deletionsgcc/testsuite/g++.dg/debug/using5.C
- gcc/testsuite/g++.dg/inherit/using4.C 2 additions, 2 deletionsgcc/testsuite/g++.dg/inherit/using4.C
- gcc/testsuite/g++.dg/lookup/name-clash9.C 2 additions, 2 deletionsgcc/testsuite/g++.dg/lookup/name-clash9.C
- gcc/testsuite/g++.dg/lookup/pr6936.C 23 additions, 0 deletionsgcc/testsuite/g++.dg/lookup/pr6936.C
- gcc/testsuite/g++.dg/lookup/using24.C 12 additions, 0 deletionsgcc/testsuite/g++.dg/lookup/using24.C
- gcc/testsuite/g++.dg/lookup/using25.C 28 additions, 0 deletionsgcc/testsuite/g++.dg/lookup/using25.C
- gcc/testsuite/g++.dg/lookup/using26.C 27 additions, 0 deletionsgcc/testsuite/g++.dg/lookup/using26.C
Loading
Please register or sign in to comment