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. 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. -- James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
