re PR c++/16829 (default parameter can be not one of the last in function)
PR c++/16829 * decl.c (start_preparsed_function): Check default arguments unconditionally. * name-lookup.c (pushdecl_maybe_friend): Check default arguments of all functions and function templates. * parser.c (cp_parser_late_parsing_default_args): Check default arguments. * decl2.c (check_default_args): Set missing default arguments to error_mark_node. * g++.dg/other/default2.C: New test. * g++.dg/other/default3.C: New test. From-SVN: r109950
Showing
- gcc/cp/ChangeLog 12 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/decl.c 2 additions, 2 deletionsgcc/cp/decl.c
- gcc/cp/decl2.c 1 addition, 1 deletiongcc/cp/decl2.c
- gcc/cp/name-lookup.c 3 additions, 5 deletionsgcc/cp/name-lookup.c
- gcc/cp/parser.c 3 additions, 0 deletionsgcc/cp/parser.c
- gcc/testsuite/ChangeLog 6 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/g++.dg/other/default2.C 9 additions, 0 deletionsgcc/testsuite/g++.dg/other/default2.C
- gcc/testsuite/g++.dg/other/default3.C 109 additions, 0 deletionsgcc/testsuite/g++.dg/other/default3.C
Loading
Please register or sign in to comment