From owner-svn-src-head@freebsd.org Wed Jul 12 22:26:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69835DA6719; Wed, 12 Jul 2017 22:26:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43C857A2B4; Wed, 12 Jul 2017 22:26:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id ACB5F10AF01; Wed, 12 Jul 2017 18:26:05 -0400 (EDT) From: John Baldwin To: Ryan Libby Cc: Roman Divacky , Ryan Libby , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320908 - head/sys/kern Date: Wed, 12 Jul 2017 15:20:58 -0700 Message-ID: <25032740.sJOsNDzvpa@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201707120730.v6C7UExf041447@repo.freebsd.org> <20170712074326.GA41347@vlakno.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 12 Jul 2017 18:26:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2017 22:26:07 -0000 On Wednesday, July 12, 2017 01:09:39 AM Ryan Libby wrote: > On Wed, Jul 12, 2017 at 12:43 AM, Roman Divacky wrote: > > Clang knows about %b modifier and can do some semantic analysis on it. > > Currently it type checks the first arg to be an int and the second to be > > a char*. > > > > Do you think it would be worth modifying the checks to include > > this new functionality? Do you think you would like to take a stab > > at it? > > Yes, I plan to send that to clang upstream. I originally had those > changes in this commit but I was directed rather to send them first to > upstream. See here [1] for roughly what I plan to send upstream > (although I have since noticed some unit tests that I guess should be > extended). > > For now, the semantic analysis should be fine as the change should be > backward compatible and I haven't yet changed any of the users of > %b to use the new capabilities. There is also '%b' support in GCC via -fformat-extensions. GCC 4.2.1 probably matters less, but the external GCC toolchain ports use a patch in /usr/ports/devel/powerpc64-gcc/files/freebsd-format-extensions that you may need to adjust as well. -- John Baldwin