This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add a Solaris-specific format string check


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]