On Wed, Dec 16, 2009 at 07:41:45AM -0500, James Carlson wrote:
> Fedor Sergeev wrote:
> > By the way, as we are likely to revisit -erroff implementation, I would 
> > like to
> > ask this mailing list - do you have any ideas on -erroff/-errwarn interface 
> > improvement?
> > Something that you always thought about but were too shy to ask? ;)
> 
> Not quite on those flags (which seem to work well enough), but there is
> an old RFE I filed some years ago to allow for better printf/scanf
> format string versus argument checking.

Eh... thats kind of a huuuge way off the topic :)

> 
> As you likely know, there are quite a few printf/scanf variants around
> besides the libc standards-compliant ones.  For example, the formatting
> in the kernel is different because there's no floating point and there
> are a few extra formatting specifiers.  Mdb has an internal printf
> mechanism that has quite a few additional specifiers.  Syslog has "%m".
> 
> Unfortunately, you really can't use PRINTFLIKE or SCANFLIKE unless it's
> identical to the standards-complaint functions.  If it's not, then the
> checking is off by a bit -- or possibly by a lot.  Many of those things
> are now just flying blind.
> 
> It would be nice to have a way to tell the compiler and/or lint that a
> given function has printf/scanf behavior with some exceptions, and allow
> the implementor to specify how specifiers and modifiers work for that
> function.

One of the biggest issues here would be to figure out proper user interface.
Is there any gcc extension that does something useful for this matter?
I dont remember one right away.

regards,
  Fedor.

Reply via email to