[PATCH] Suppress a warning about mismatched parameter in format

mcnichol at austin.ibm.com mcnichol at austin.ibm.com
Wed Apr 25 09:10:45 PDT 2007


> From xorg-bounces at lists.freedesktop.org Wed Apr 25 08:25:01 2007
> X-Original-To: xorg at lists.freedesktop.org

> From: Daniel Stone <daniel at fooishbar.org>
>On Wed, Apr 25, 2007 at 08:51:07AM -0400, Thomas Dickey wrote:
>> On Wed, Apr 25, 2007 at 02:34:36PM +0200, Samuel Thibault wrote:
>> > Samuel Thibault, le Wed 25 Apr 2007 14:23:37 +0200, a =E9crit :
>> > > Giuseppe Bilotta, le Wed 25 Apr 2007 14:15:33 +0200, a =E9crit :
>> > > >  gcc has a 'z' format string
>> > > > extension that handles this (%zu turns out as the correct architecture
>> > > > dependent size_t) ... can we rely on it?
>> > >=20
>> > > It's not an extension, it's described in susv3.
>> >=20
>> > It's even in C99 actually.
>>=20
>> That's only a half-answer.  The complete answer would be to point out
>> whether one can rely on the feature for the compilers that are expected
>> to be on the platforms which the code would be compiled on.
>>=20
>> (curious if anyone's going to provide that information)
>
>Well, gcc can deal with it, so I guess the only ones left are Sun's
>compiler (which should), and OpenBSD still use gcc 2.95 for VAX and
>m68k, but off the top of my head that doesn't support named initialisers
>anyway.
>
>Aside from that, it's only really IBM (Dan Nicholson, though he hasn't
>been around of late) and SCO (Kean Johnson) that I know of who are still
>building on the more obscure platforms.

Sorry I haven't been following this tread very close, until I noticed
my name (or something close to it) pop up.

Anyway, it looks like the AIX versions of printf and related functions
in our libc.a do not support %z.  Since these functions are in the
systems libc.a, it doesn't really matter what compiler is used.

Dan McNichol



More information about the xorg mailing list