aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-04-19 12:28:24 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-04-19 12:28:24 -0400
commit79d8a2724290d3c6e14f9935b62993b90776aa4e (patch)
treea187b2259ee70bc4c76bd1bfeafd261b460ed430 /gcc/cp/error.c
parent86c0810c726e89e35cf5c0c037953164e8d38ae0 (diff)
downloadgcc-79d8a2724290d3c6e14f9935b62993b90776aa4e.zip
gcc-79d8a2724290d3c6e14f9935b62993b90776aa4e.tar.gz
gcc-79d8a2724290d3c6e14f9935b62993b90776aa4e.tar.bz2
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
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 300fe0c..6bac7ec 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1403,7 +1403,10 @@ dump_function_decl (tree t, int flags)
show_return = !DECL_CONV_FN_P (t) && !DECL_CONSTRUCTOR_P (t)
&& !DECL_DESTRUCTOR_P (t);
if (show_return)
- dump_type_prefix (TREE_TYPE (fntype), flags);
+ {
+ tree ret = fndecl_declared_return_type (t);
+ dump_type_prefix (ret, flags);
+ }
/* Print the function name. */
if (!do_outer_scope)