Andrew Dunstan <and...@dunslane.net> writes:
> What I'd like to know is why it doesn't complain elsewhere.

That question is backwards ...

> The one 
> non-Linux non-Windows machine I have is FBSD. Its gcc (4.2.1) doesn't 
> expand  "%m" but doesn't complain about it either.

It's libc, not gcc, that's actually got the responsibility of processing
format specifiers at runtime.  gcc just assumes a particular behavior of
libc.  I quote from the gcc 4.4.5 manual, under -Wformat:

     The formats are checked against the format features supported by
     GNU libc version 2.2.  These include all ISO C90 and C99 features,
     as well as features from the Single Unix Specification and some
     BSD and GNU extensions.  Other library implementations may not
     support all these features; GCC does not support warning about
     features that go beyond a particular library's limitations.

So the question to ask is not why gcc doesn't complain about %m
elsewhere, but why it does complain in your Windows installation.
I'm guessing that the mingw people hacked it.  If you're lucky,
they might have hacked in an extra switch to control the behavior ---
I notice quite a few subsidiary switches that tweak -Wformat behavior
in standard gcc 4.4.5.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to