Re: Add %z support to elog/ereport? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add %z support to elog/ereport?
Date
Msg-id 7778.1390506657@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add %z support to elog/ereport?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Add %z support to elog/ereport?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> I checked on my HPUX box and find that what it prints for "%zu" is
> "zu", confirming my thought that it'd just abandon processing of the
> %-sequence.  (Interesting that it doesn't eat the "z" while doing
> so, though.)

Further testing on that box shows that its ancient gcc (2.95.3) doesn't
know "z" either, which means that the patch produces a boatload of
compile warnings like this:

mcxt.c: In function `MemoryContextAllocZero':
mcxt.c:605: warning: unknown conversion type character `z' in format
mcxt.c:605: warning: too many arguments for format

While I am not really expecting this gcc to compile PG cleanly anymore,
the idea that we might get many dozen such warnings on more-current
compilers is scarier, as that might well interfere with people's
ability to do development on, say, Windows.  Could somebody check
whether MSVC for instance complains about format strings using "z"?
Or shall I just commit this and we'll see what the buildfarm says?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [COMMITTERS] pgsql: Compress GIN posting lists, for smaller index size.
Next
From: Heikki Linnakangas
Date:
Subject: Re: Warning in new GIN code