From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128364 invoked by alias); 23 Feb 2019 08:22:17 -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 128349 invoked by uid 89); 23 Feb 2019 08:22:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:919 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; Sat, 23 Feb 2019 08:22:16 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEFB93003BDB; Sat, 23 Feb 2019 08:22:14 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-64.ams2.redhat.com [10.36.117.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67AAD17967; Sat, 23 Feb 2019 08:22:14 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x1N8MCXK022276; Sat, 23 Feb 2019 09:22:12 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x1N8MAc1022275; Sat, 23 Feb 2019 09:22:10 +0100 Date: Sat, 23 Feb 2019 09:55:00 -0000 From: Jakub Jelinek To: Martin Sebor Cc: "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] make -Wformat-overflow consistent between data models Message-ID: <20190223082210.GO7611@tucnak> Reply-To: Jakub Jelinek References: <24ae4245-ff17-4159-2bf4-c974b3ad823c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24ae4245-ff17-4159-2bf4-c974b3ad823c@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg01882.txt.bz2 On Fri, Feb 22, 2019 at 07:25:53PM -0700, Martin Sebor wrote: > A few tests recently added for PR 88993 introduced an assumption > on the host compiler's data model that breaks between ILP32 and > LP64, causing failures test run failures > (see https://gcc.gnu.org/ml/gcc-patches/2019-02/msg01867.html). > Rather than avoiding the problem in the tests the attached patch > removes the data model assumption from the sprintf pass itself, > making the warnings emitted by the pass consistent regardless. > > Bootstrapped and tested on x86_64-linux, and smoke-tested with > an i386-linux GCC. > > Martin > gcc/ChangeLog: > > * gimple-ssa-sprintf.c (target_strtol): Rename... > (target_strtohwi): ...to this. Handle values up to HOST_WIDE_INT_MAX. > (parse_directive): Adjust to name change. Use HOST_WIDE_INT_MAX to > check for range error. Ok. Jakub