From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113475 invoked by alias); 7 Jan 2019 16:04:27 -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 113465 invoked by uid 89); 7 Jan 2019 16:04:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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, 07 Jan 2019 16:04:26 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AEF29C070146; Mon, 7 Jan 2019 16:04:24 +0000 (UTC) Received: from localhost (unknown [10.33.36.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AAB463B83; Mon, 7 Jan 2019 16:04:24 +0000 (UTC) Date: Mon, 07 Jan 2019 16:04:00 -0000 From: Jonathan Wakely To: NightStrike Cc: Nicholas Krause , GCC Patches Subject: Re: [PATCH] Use proper print formatter in main function in fixincl.c Message-ID: <20190107160423.GU15627@redhat.com> References: <20181220222353.16951-1-xerofoify@gmail.com> <20190107155655.GA9159@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-01/txt/msg00318.txt.bz2 On 07/01/19 11:01 -0500, NightStrike wrote: >On Mon, Jan 7, 2019 at 10:57 AM Jonathan Wakely wrote: >> >> On 20/12/18 17:23 -0500, Nicholas Krause wrote: >> >This fixes the bug id, 71176 to use the proper known >> >code print formatter type, %lu for size_t rather than >> >%d which is considered best pratice for print statements. >> >> Well the proper specifier for size_t is %zu, but since you cast to >> unsigned long then %lu is right. > >Wouldn't the right fix be to not cast to unsigned long and use %zu? That was added in C99 and so is not part of C++98. GCC only requires a C++98 compiler (and library).