This is the mail archive of the gcc@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: formats and syslog question


On Sat, 14 Sep 2002, Marc Espie wrote:

> *But* there is a concrete need for a syslog() format *right now*.
> It is very useful from a security point of view.
> 
> And it's completely cross-platform. syslog exists on every unix platform,
> and %m is standard for it on most of it (since it's specified in Single
> Unix).
> 
> Compare this to all the other samples of functions which were given that
> are much more exotic (linux's printk INCLUDED).

For most users, the use of -pedantic is fairly exotic - and they can
ignore this particular warning for syslog if they do use -pedantic.  
(It's a warning, not a pedwarn, so does not become an error with
-pedantic-errors.)  I've suggested warning control as a reasonable
medium-term (3.4 - and a syslog format wouldn't be appropriate to add at
this development stage, either) solution.

> How does it hurt to have this added in the FSF tree ?
> Okay, it's bloat.
> 
> Wow. What bloat. An extra entry in a format table and three pesky lines of
> code.

Duplication of a table and the consequent risk of divergence between the
two similar but different tables, both of which now need to be maintained.

> Give me a single example of a function that understands formats that's not
> supported yet and that is as wide-spread as syslog...
> 
> Granted, I can do this in my tree (and I will), but come on, this can be
> of use to everyone right now.

syslog is supported, and has been for a long time, by the printf format;
there's just the warning for the limited number of users using -pedantic.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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