From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118253 invoked by alias); 24 Sep 2015 13:24:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 118241 invoked by uid 89); 24 Sep 2015 13:24:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 24 Sep 2015 13:24:44 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id C48282F90EA; Thu, 24 Sep 2015 13:24:42 +0000 (UTC) Received: from [10.10.116.37] (ovpn-116-37.rdu2.redhat.com [10.10.116.37]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8ODOgj1030118; Thu, 24 Sep 2015 09:24:42 -0400 Subject: Re: [C++ Patch] PR 53856 To: Paolo Carlini , "gcc-patches@gcc.gnu.org" References: <5601ACA0.3010405@oracle.com> From: Jason Merrill Message-ID: <5603F999.4030502@redhat.com> Date: Thu, 24 Sep 2015 13:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5601ACA0.3010405@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-09/txt/msg01855.txt.bz2 On 09/22/2015 03:31 PM, Paolo Carlini wrote: > msg = G_("default template arguments may not be used in " > "partial specializations"); > + else if (current_class_type && !CLASSTYPE_IS_TEMPLATE (current_class_type)) > + /* Per [temp.param]/9, "A default template-argument shall not be > + specified in the template-parameter-lists of the definition of > + a member of a class template that appears outside of the member's > + class.", thus if we aren't handling a member of a class template > + there is no need to examine the parameters. */ > + last_level_to_check = template_class_depth (current_class_type) + 1; > else > msg = G_("default argument for template parameter for class enclosing %qD"); Why not handle this below, with the other code that sets last_level_to_check? Jason