Florian Pflug <fgp@phlo.org> writes:
> On Jan21, 2014, at 18:56 , Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> it wouldn't play nice with GCC's desire to check format strings.
>> That last is a deal-breaker. It's not just whether "gcc desires" to check
>> this --- we *need* that checking, because people get it wrong without it.
> There's an attribute that enables this check for arbitrary functions AFAIR.
Yeah, we use it (to enable checking for ereport et al). The issue is that
the semantics of the format-string are pretty much hard-wired into gcc;
eg it knows that "%ld" should match an argument of type "long int".
IIRC it does know a couple of different styles corresponding to popular
libc implementations ... but it is not going to support some random
semantics that we dream up.
regards, tom lane