From patchwork Mon Jan 6 17:58:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Butcher X-Patchwork-Id: 307396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BAC32C00D1 for ; Tue, 7 Jan 2014 04:58:12 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:content-type:content-transfer-encoding:date:from :to:cc:subject:in-reply-to:references:message-id; q=dns; s= default; b=gGTOYecWijPxhMNBoIEVU9IPwzz8JI/e+psZz7RwOyxi7ESBrMQ91 TFdGEw6LnYTsUpIsRjfT2sZ5hTeUxMMMNRNXvuGHcthqT+AmK0npFsczand0xGJH LWWTqlv6/DGo41NJbRrpcjtIbdLSLH49TtnWY/YLFz/CTwK9QLcnoc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:content-type:content-transfer-encoding:date:from :to:cc:subject:in-reply-to:references:message-id; s=default; bh= hG/qoJAW8jbabzpTWRpTvz0uAvI=; b=NDaWq5grExi3T54bhJ7Xu8TBtfknXnvu Tqy/iQ+5Kc/+ZRDaw8tOydOMjVr00BskNh0KmH26zr9+wWofsMtwloWIYQ6moKFR JaZYjJA41Jf5uAYl2INi3PMYtNN5HYU43zvvLgZoolIyifWF4vNhDMXSX78EYIjV 1eQrVY+eiYc= Received: (qmail 28611 invoked by alias); 6 Jan 2014 17:58:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 28595 invoked by uid 89); 6 Jan 2014 17:58:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL, BAYES_50, KAM_COUK, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: avasout07.plus.net Received: from avasout07.plus.net (HELO avasout07.plus.net) (84.93.230.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Jan 2014 17:58:04 +0000 Received: from webmail.plus.net ([84.93.228.66]) by avasout07 with smtp id Ahy11n0051SbfYc01hy1kB; Mon, 06 Jan 2014 17:58:01 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=Se7OKJhu c=1 sm=1 tr=0 a=C5+YawzV8SR07mwocaP9vA==:117 a=rJgRRbfb+UpHm5KwX9t5uQ==:17 a=0Bzu9jTXAAAA:8 a=dYCPD3cKDi0A:10 a=5LfTt-Tm1vgA:10 a=EDeDkkTReK4A:10 a=IkcTkHD0fZMA:10 a=ZBkl__CYAAAA:8 a=mrHjP8x4AAAA:8 a=7vtFykjVAAAA:8 a=IOqjcrRHgK4A:10 a=i4eW5Ftl-DihhVd7OBIA:9 a=QEXdDO2ut3YA:10 X-AUTH: jessaminenet+adam:2501 Received: from munkyhouse.force9.co.uk ([84.92.244.81]) by webmail.plus.net with HTTP (HTTP/1.1 POST); Mon, 06 Jan 2014 17:58:01 +0000 MIME-Version: 1.0 Date: Mon, 06 Jan 2014 17:58:01 +0000 From: Adam Butcher To: Jason Merrill Cc: , Volker Reichelt Subject: Re: [PATCH] Fix PR c++/59638 In-Reply-To: <52CABF82.5040306@redhat.com> References: <1388829298-14606-1-git-send-email-adam@jessamine.co.uk> <52CABF82.5040306@redhat.com> Message-ID: <42e69e6bda9dd7c17a10c52eed0eb6bc@imap.force9.net> X-Sender: adam@jessamine.co.uk User-Agent: Roundcube Webmail/0.7.4 On 2014-01-06 14:36, Jason Merrill wrote: > On 01/04/2014 04:54 AM, Adam Butcher wrote: >> + /* Declarations involving function parameter lists containing >> implicit >> + template parameters will have been made into implicit >> templates. If they >> + do not turn out to be actual function declarations then finish >> the >> + template declaration here. */ > > This will always be an error, right? Please mention that in the > comment. OK with that change. > Yes I think so. Will commit with this mod: function then + finish the template declaration here. An error message will already have + been issued. */ if (parser->fully_implicit_function_template_p) if (!function_declarator_p (declarator)) finish_fully_implicit_template (parser, /*member_decl_opt=*/0); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 991588d..68f81b7 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -16784,10 +16784,11 @@ cp_parser_init_declarator (cp_parser* parser, warning (OPT_Wattributes, "attributes after parenthesized initializer ignored"); - /* Declarations involving function parameter lists containing implicit - template parameters will have been made into implicit templates. If they - do not turn out to be actual function declarations then finish the - template declaration here. */ + /* A non-template declaration involving a function parameter list containing + an implicit template parameter will have been made into a template. If it + turns out that the resulting declaration is not an actual