This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add a Solaris-specific format string check
- From: Daniel Jacobowitz <drow at false dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 14 Jul 2004 13:20:27 -0400
- Subject: Re: Add a Solaris-specific format string check
- References: <20040714171614.GA9123@nevyn.them.org>
On Wed, Jul 14, 2004 at 01:16:14PM -0400, Daniel Jacobowitz wrote:
> Solaris has a diagnostic interface, in the kernel, which takes a restricted
> format string. This patch implements a custom -Wformat attribute for it.
> The only interesting thing is the %b conversion, which takes two arguments.
> See:
> http://docs.sun.com/db/doc/802-5747-9F/6i9g27s77?q=cmn_err+9f&a=view
>
> I'm not sure about the precedent. It was easy enough to add to c-format.c
> and enable the attribute for all targets, but that's messy. I have neither
> the inclination nor the slightest idea how to implement a properly
> extensible language for this so that it can be in the annotated source code.
> Is adding this sort of check OK?
>
> Committed to the csl-sol210-branch. I would like review (or refusal, or
> alternatives...) for mainline.
Bad me, I forgot my disclaimer: this patch includes testcases and
documentation, but has been only lightly tested, because I do not
expect it to be acceptable as-is. It introduces no regressions and 14
new passes in format.exp.
--
Daniel Jacobowitz