N3638 changes to return type deduction
authorJason Merrill <jason@redhat.com>
Fri, 19 Apr 2013 16:28:24 +0000 (12:28 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 19 Apr 2013 16:28:24 +0000 (12:28 -0400)
commit79d8a2724290d3c6e14f9935b62993b90776aa4e
treea187b2259ee70bc4c76bd1bfeafd261b460ed430
parent86c0810c726e89e35cf5c0c037953164e8d38ae0
N3638 changes to return type deduction

* decl.c (undeduced_auto_decl): New.
(require_deduced_type): New.
(fndecl_declared_return_type): New.
(decls_match): Use it.
(duplicate_decls): Don't check for auto return.
(grokdeclarator): Reject virtual auto.
* class.c (resolve_address_of_overloaded_function): Handle
auto function templates.
* decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
* cp-tree.h: Declare new fns.
* error.c (dump_function_decl): Use fndecl_declared_return_type.
* search.c (check_final_overrider): Likewise.
* pt.c (make_decltype_auto): New.
(do_auto_deduction): Require plain decltype(auto).
(is_auto): Adjust.

From-SVN: r198099
14 files changed:
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/error.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/search.c
gcc/testsuite/g++.dg/cpp1y/auto-fn18.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/auto-fn19.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/auto-fn20.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/auto-fn21.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/auto-fn8.C