https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57543
--- Comment #7 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> --- Author: paolo Date: Sat May 31 08:51:20 2014 New Revision: 211102 URL: http://gcc.gnu.org/viewcvs?rev=211102&root=gcc&view=rev Log: /cp 2014-05-31 Paolo Carlini <paolo.carl...@oracle.com> DR 1227 PR c++/57543 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add. * pt.c (tsubst_function_type): Inject the this parameter; do the substitutions in the order mandated by the DR. (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE. * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE. (static_fn_type): Copy it. * decl2.c (build_memfn_type, change_return_type, cp_reconstruct_complex_type): Likewise. * parser.c (cp_parser_lambda_declarator_opt): Likewise. * tree.c (strip_typedefs): Likewise. * typeck.c (merge_types): Likewise. /testsuite 2014-05-31 Paolo Carlini <paolo.carl...@oracle.com> DR 1227 PR c++/57543 * g++.dg/cpp0x/pr57543-1.C: New. * g++.dg/cpp0x/pr57543-2.C: Likewise. * g++.dg/cpp0x/pr57543-3.C: Likewise. * g++.dg/cpp0x/decltype59.C: Likewise. Added: trunk/gcc/testsuite/g++.dg/cpp0x/decltype59.C trunk/gcc/testsuite/g++.dg/cpp0x/pr57543-1.C trunk/gcc/testsuite/g++.dg/cpp0x/pr57543-2.C trunk/gcc/testsuite/g++.dg/cpp0x/pr57543-3.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/decl2.c trunk/gcc/cp/parser.c trunk/gcc/cp/pt.c trunk/gcc/cp/tree.c trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog