From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83238 invoked by alias); 12 Dec 2016 18:18:50 -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 83149 invoked by uid 89); 12 Dec 2016 18:18:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=dirtype_max, dirtype, DIRTYPE, DIRTYPE_MAX 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; Mon, 12 Dec 2016 18:18:48 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EEB69C04D2AF; Mon, 12 Dec 2016 18:18:45 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-14.phx2.redhat.com [10.3.116.14]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBCIIjTb016359; Mon, 12 Dec 2016 13:18:45 -0500 Subject: Re: [PATCH] handle integer overflow/wrapping in printf directives (PR 78622) To: Martin Sebor , Jakub Jelinek References: <20161201072647.GF3541@tucnak.redhat.com> <20161201091526.GH3541@tucnak.redhat.com> <945f3abe-dddc-8579-977b-a99ebeef54a9@redhat.com> <7d9d10aa-36c2-f649-b89d-1131bdb59424@gmail.com> <5a2781c9-0d91-80cd-d1d1-23a75fc8992f@redhat.com> Cc: !Gcc Patch List From: Jeff Law Message-ID: Date: Mon, 12 Dec 2016 18:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg01065.txt.bz2 On 12/07/2016 12:17 PM, Martin Sebor wrote: >> OK. So is the hangup really a problem in how the return type is >> documented? I parsed the comment as essentially saying we return true >> if the range gets adjusted in any way -- thus a sign change in the first >> block would qualify, but we returned false which seemed inconsistent. >> >> Looking at it again, what I think it's saying is we're returning true >> only for a subset of adjustments to the range, ie, those cases where the >> postcondition does not hold. Correct? > > Correct. Would changing the description of the return value to > this make it clearer? > > Return true when the range has been adjusted to the full unsigned > range of DIRTYPE, [0, DIRTYPE_MAX], false otherwise. Yea, that does help. I see you've got an updated version posted. Let me take a final (?) looksie now that I have a better understanding of the return value. I think that was the biggest stumbling block on my side. Jeff