From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8486 invoked by alias); 8 Oct 2011 23:15:35 -0000 Received: (qmail 8476 invoked by uid 22791); 8 Oct 2011 23:15:34 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 08 Oct 2011 23:15:15 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p98NFEwN013883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 8 Oct 2011 19:15:15 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p98NFEHK017326; Sat, 8 Oct 2011 19:15:14 -0400 Received: from [0.0.0.0] (ovpn-113-63.phx2.redhat.com [10.3.113.63]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p98NFCRU018833; Sat, 8 Oct 2011 19:15:13 -0400 Message-ID: <4E90D97F.9060506@redhat.com> Date: Sun, 09 Oct 2011 01:18:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Ed Smith-Rowland <3dw4rd@verizon.net> CC: gcc-patches Subject: Re: [C++-11] User defined literals References: <4E6F6A1C.90305@verizon.net> <4E7008DA.6090703@redhat.com> <4E76FBBB.6050601@verizon.net> <4E77B002.50804@redhat.com> <4E77F549.6000704@verizon.net> <4E78F475.8070303@redhat.com> <4E8C7DF0.9030809@verizon.net> <4E8CC75A.5090900@redhat.com> <4E909588.3000801@verizon.net> In-Reply-To: <4E909588.3000801@verizon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2011-10/txt/msg00660.txt.bz2 On 10/08/2011 07:25 PM, Ed Smith-Rowland wrote: > Also, In spite of the documentation cp_parser_template_parameter_list > returns a TREE_VEC not a TREE_LIST. This happens inside > end_template_parm_list called inside the former. So parameter_list is a > TREE_VEC, parm_list is a TREE_LIST, parm is a PARM_DECL, etc. Ah, I was thinking of template arguments rather than parameters. You're right, except that INNERMOST_TEMPLATE_PARMS should be just TREE_VALUE; you are already starting from the innermost parm list if you use what end_template_parm_list returns. Though it occurs to me that push_template_decl_real might be a better place for this check. > I'm still looking for a fix for duplicate errors/warnings coming from > cp_parser_operator. I tried cp_parser_error and lost the errors. I'll > look for different code paths for the two invocations and see if I can > either move something up or see if something is set differently between > the two that would be useful for a flag. One approach would be changing the token stream after the first error to something that won't produce another error, e.g. changing token->u.value to be an empty string after you complain about it being non-empty. Jason