From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94628 invoked by alias); 1 Jul 2015 20:54:53 -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 94619 invoked by uid 89); 1 Jul 2015 20:54:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 01 Jul 2015 20:54:51 +0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t61KsnTH030086 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Jul 2015 20:54:49 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t61KsmoF030301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 1 Jul 2015 20:54:49 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t61Ksmmg003025; Wed, 1 Jul 2015 20:54:48 GMT Received: from [192.168.1.4] (/87.19.223.167) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 01 Jul 2015 13:54:48 -0700 Message-ID: <55945394.5050605@oracle.com> Date: Wed, 01 Jul 2015 20:54:00 -0000 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Andreas Schwab CC: "gcc-patches@gcc.gnu.org" , Jason Merrill , Tom Tromey , tom@tromey.com Subject: Re: [C++/preprocessor Patch] PR c++/53690 References: <55944DE8.9030800@oracle.com> <87vbe3y5cp.fsf@igel.home> In-Reply-To: <87vbe3y5cp.fsf@igel.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00088.txt.bz2 Hi, On 07/01/2015 10:45 PM, Andreas Schwab wrote: > Paolo Carlini writes: > >> @@ -972,21 +972,20 @@ ucn_valid_in_identifier (cpp_reader *pfile, cppcha >> or 0060 (`), nor one in the range D800 through DFFF inclusive. >> >> *PSTR must be preceded by "\u" or "\U"; it is assumed that the >> - buffer end is delimited by a non-hex digit. Returns zero if the >> - UCN has not been consumed. >> + buffer end is delimited by a non-hex digit. Returns one if the >> + UCN has not been consumed, zero otherwise. > The name of the function would make more sense if it returned a boolean > with true meaning success. To be clear (the diff can be a little confusing) we are talking about _cpp_valid_ucn, the name of the function I'm patching. That said, I'm of course open to proposals about a better name for the patched function. Likewise for the values returned, which I picked for consistency with all the other functions in libcpp, the usual "unix" convention. Paolo.