httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: [PATCH] inaddr printf stuff
Date Tue, 07 Apr 1998 20:29:50 GMT
It's only for warnings, it's not strict type checking or anything, so
there's really nothing to work around in any compiler.  It's just that gcc
is used by so many of us that it seems useful to cater to it -- especially
when it can find mistakes for us.

I'm not aware of similar warnings in other compilers.  But if they do
exist, they're probably not configured to warn for these functions because
this is triggered by the __attribute__((printf,5,6)) stuff, which is a gcc
extension (and disabled for non-gcc).  If they do warn, and they don't
treat the %p as an arbitrary pointer then they're broken, because %p is
ANSI for "expect a void *, print it in hex"... and the character after the
%p isn't part of the formatter normally so they shouldn't even consider


On Tue, 7 Apr 1998, Martin Kraemer wrote:

> On Tue, Apr 07, 1998 at 03:51:02AM -0700, Dean Gaudet wrote:
> > Sorry to detract from the holy naming wars.  Here's a patch I'm wavering
> > on.  This is the evolution of a patch I posted last october to give us a
> > method of easily printing struct inaddr and such.  The intent was for this
> > to be used to improve the content of the error messages in apache 1.3
> > (which has less content than 1.2 -- 1.2 includes the client address in a
> > lot more errors than 1.3)
> Looks good. But is there really no alternative to the %pI / %pA formats?
> There are compilers other than gcc out there.... Okay, we win gcc's
> half-baked type checking (which here is almost defeated because it
> accepts any pointer anyway). But such a format is not "clean" and
> consistent with the other format types (%.p or %+p or %#p? Nope, that's
> not clean either.... %A and %I will probably make gcc choke. Too bad.)
> Hmmm... I cabn't think of a better solution either.
>     Martin
> -- 
> | S I E M E N S |  <>  |      Siemens Nixdorf
> | ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
> | N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
> ~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

View raw message