From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32564 invoked by alias); 12 Oct 2011 18:12:49 -0000 Received: (qmail 32552 invoked by uid 22791); 12 Oct 2011 18:12:48 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,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; Wed, 12 Oct 2011 18:12:34 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9CICYIL019625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Oct 2011 14:12:34 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9CICYaE025663; Wed, 12 Oct 2011 14:12:34 -0400 Received: from [0.0.0.0] (ovpn-113-114.phx2.redhat.com [10.3.113.114]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p9CICWQb026982; Wed, 12 Oct 2011 14:12:33 -0400 Message-ID: <4E95D88F.6030404@redhat.com> Date: Wed, 12 Oct 2011 18:49: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> <4E90D97F.9060506@redhat.com> <4E922BEF.1080100@verizon.net> <4E947505.3050404@redhat.com> <4E947562.5090505@redhat.com> <4E95201F.4020004@verizon.net> In-Reply-To: <4E95201F.4020004@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/msg01021.txt.bz2 On 10/12/2011 01:05 AM, Ed Smith-Rowland wrote: > cp_parser_operator(function_id) is simply run twice in > cp_parser_unqualified_id. > Once inside cp_parser_template_id called at parser.c:4515. > Once directly inside cp_parser_unqualified_id at parser.c:4525. Ah. You could try replacing the operator "" X tokens with a single CPP_LITERAL_OPERATOR token, like we do for CPP_NESTED_NAME_SPECIFIER and CPP_TEMPLATE_ID. > cp_parser_template_id never succeeds with literal operator templates. I > find that curious. But I haven't looked real hard and the things do get > parsed somehow. I'd only expect it to succeed if you actually wrote, e.g., operator""_c<'a','b','c'>(); Jason