Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2017 17:11:00 -0700
From:      Ryan Libby <rlibby@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Roman Divacky <rdivacky@freebsd.org>, Ryan Libby <rlibby@freebsd.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r320908 - head/sys/kern
Message-ID:  <CAHgpiFyed_MKHjVq4LFUwpnpioOyYecu_rnO=Z8EF1Cus75fTQ@mail.gmail.com>
In-Reply-To: <25032740.sJOsNDzvpa@ralph.baldwin.cx>
References:  <201707120730.v6C7UExf041447@repo.freebsd.org> <20170712074326.GA41347@vlakno.cz> <CAHgpiFwYvnaG_=Lx1GEOspu21CZEg4=dXuqFhjd_9yOpkj-DBA@mail.gmail.com> <25032740.sJOsNDzvpa@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 12, 2017 at 3:20 PM, John Baldwin <jhb@freebsd.org> wrote:
> On Wednesday, July 12, 2017 01:09:39 AM Ryan Libby wrote:
>> On Wed, Jul 12, 2017 at 12:43 AM, Roman Divacky <rdivacky@freebsd.org> 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.

Thanks.  I knew about the in-tree gcc format extensions, but hadn't
considered ports.  I'll follow up with this in a little bit.  I
currently have a few other patches in gestation working through some
bitrot with gcc amd64 kernel builds.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHgpiFyed_MKHjVq4LFUwpnpioOyYecu_rnO=Z8EF1Cus75fTQ>