svn commit: r320908 - head/sys/kern
John Baldwin
jhb at freebsd.org
Wed Jul 12 22:26:07 UTC 2017
On Wednesday, July 12, 2017 01:09:39 AM Ryan Libby wrote:
> On Wed, Jul 12, 2017 at 12:43 AM, Roman Divacky <rdivacky at 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.
--
John Baldwin
More information about the svn-src-all
mailing list