From owner-cvs-all Sat Apr 20 14:30:28 2002 Delivered-To: cvs-all@freebsd.org Received: from electricrain.com (electricrain.com [64.71.143.226]) by hub.freebsd.org (Postfix) with ESMTP id 92CB037B41B for ; Sat, 20 Apr 2002 14:30:23 -0700 (PDT) Received: (qmail 1918 invoked by uid 629); 20 Apr 2002 21:30:23 -0000 Date: Sat, 20 Apr 2002 14:30:23 -0700 From: Bill Fenner To: "J. Mallett" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/m4 gnum4.c Message-ID: <20020420213023.GF855@electricrain.com> References: <200204202113.g3KLD0d68670@freefall.freebsd.org> <20020420212109.GC855@electricrain.com> <20020420212849.GM20367@FreeBSD.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020420212849.GM20367@FreeBSD.ORG> User-Agent: Mutt/1.3.27i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Apr 20, 2002 at 09:28:49PM +0000, J. Mallett wrote: > No, seriously, [putting on dunce cap preemptively] what's %zu? z is the c99 length modifier for size_t. So instead of guessing whether it's better to do %u, %lu or %llu based on what you think a size_t might end up being, you simply do %zu and that's the right size. I made the "blow gcc's mind" comment because I doubt our -Wformat knows about "z". I also don't know for sure when the c99 printf changes will be merged to -stable, which may create maintainability issues for you. ("man 3 printf" has a nice little table of all the supported length modifiers; the new ones for c99 are hh, ll, j, t, z.) Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message