From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2308 invoked by alias); 7 Mar 2014 13:27:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2298 invoked by uid 89); 7 Mar 2014 13:27:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham 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 ESMTP; Fri, 07 Mar 2014 13:27:20 +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 s27DRF8a017283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Mar 2014 08:27:16 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s27DRE14002442; Fri, 7 Mar 2014 08:27:15 -0500 Message-ID: <5319C931.9090907@redhat.com> Date: Fri, 07 Mar 2014 13:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Yao Qi CC: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [PATCH 2/4] Error on bad count number References: <1394023608-10761-1-git-send-email-yao@codesourcery.com> <1394023608-10761-3-git-send-email-yao@codesourcery.com> <20140305142939.GB16858@adacore.com> <531749BA.8050806@redhat.com> <5318456D.3010709@codesourcery.com> <53186842.9030704@redhat.com> <5319938B.60402@codesourcery.com> In-Reply-To: <5319938B.60402@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-03/txt/msg00184.txt.bz2 On 03/07/2014 09:38 AM, Yao Qi wrote: > On 03/06/2014 08:21 PM, Pedro Alves wrote: >> > AFAICS, get_number handles negative numbers. E.g., >> > > Yes, get_number handles negative, but is it expected for get_number > to handle negative? Nothing in a name like "get number" suggests to me only positive numbers would be returned. I think it should be up to the caller to handle whether the returned value is valid in that context. -- Pedro Alves