From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32523 invoked by alias); 31 May 2014 08:52:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 32482 invoked by uid 55); 31 May 2014 08:51:58 -0000 From: "paolo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57543] decltype needs explicit 'this' pointer in member function declaration of template class with trailing return type Date: Sat, 31 May 2014 08:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com X-Bugzilla-Target-Milestone: 4.10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02598.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57543 --- Comment #7 from 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 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 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