From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113108 invoked by alias); 31 Jul 2018 19:56:38 -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 113094 invoked by uid 89); 31 Jul 2018 19:56:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=our X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 31 Jul 2018 19:56:36 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-03.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fkakz-0006sA-Tk from joseph_myers@mentor.com ; Tue, 31 Jul 2018 12:56:33 -0700 Received: from digraph.polyomino.org.uk (137.202.0.87) by SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 31 Jul 2018 20:56:29 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.86_2) (envelope-from ) id 1fkakv-0001Hw-EQ; Tue, 31 Jul 2018 19:56:29 +0000 Date: Tue, 31 Jul 2018 19:56:00 -0000 From: Joseph Myers To: David Malcolm CC: Richard Biener , GCC Patches Subject: Re: [PATCH 5/5] Formatted printing for dump_* in the middle-end In-Reply-To: <1533046763.22345.168.camel@redhat.com> Message-ID: References: <1532730752-10525-1-git-send-email-dmalcolm@redhat.com> <1532730752-10525-6-git-send-email-dmalcolm@redhat.com> <1533046763.22345.168.camel@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2018-07/txt/msg01995.txt.bz2 On Tue, 31 Jul 2018, David Malcolm wrote: > I didn't exhaustively check every callsite to the changed calls; I'm > assuming that -Wformat during bootstrap has effectively checked that > for me. Though now I think about it, I note that we use > HOST_WIDE_INT_PRINT_DEC in many places: is this guaranteed to be a > valid input to pp_format on all of our configurations? HOST_WIDE_INT_PRINT_DEC should not be considered safe with pp_format (although since r197049 may have effectively stopped using %I64 on MinGW hosts, I'm not sure if there are current cases where it won't work). Rather, it is the job of pp_format to map the 'w' length specifier to HOST_WIDE_INT_PRINT_DEC etc. I think it clearly makes for cleaner code to limit use of HOST_WIDE_INT_PRINT_* to as few places as possible and to prefer use of internal printf-like functions that accept formats such as %wd where possible. -- Joseph S. Myers joseph@codesourcery.com