printf("%lf",...) isn't actually portable

Started by Tom Lanealmost 8 years ago1 messageshackers
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

I noticed while poking at the recent ecpg unpleasantness that some
of my older critters were warning about use of %lf conversions in
printf. Looking into it, I find that current POSIX says the "l"
is a no-op, while SUSv2 says it's undefined. I think this usage
got into our code as a result of people making false analogies
between scanf and printf conversions.

I think we should just switch these to plain %f, as per attached.

regards, tom lane

Attachments:

remove-unportable-lf-format-specs.patchtext/x-diff; charset=us-ascii; name=remove-unportable-lf-format-specs.patchDownload+9-9