Return 0 (with a warning) for sprintf("%.0g") and sprintf("%.0f")
There is special case code in the sprintf implementation, for simple %f and %g
formats, conditionally compiled in only when NVs are doubles. Under long
doubles, these are handled by the general purpose code, which always returns
0 if the argument is missing. Note that sprintf(" %.0g"), ie a leading space,
sufficient to bypass the special case code, would return the string " 0".
The special case code used to return an empty string, meaning that the
behaviour of sprintf("%.0g") and sprintf("%.0f") was inconsistent between a
perl built with doubles, and a perl with long doubles, and the behaviour of
sprintf("%.0g") and sprintf(" %.0g") was inconsistent.
5b98cd54dff3b163 fixed #62874 - the special case code did not warn, but
changed behaviour to return 0.
d347ad18ecf3da70 undid the behaviour change,
viewing it as a regression. However, the tests added in
5b98cd54dff3b163
expose the inconsistency in behaviour between doubles and long doubles.
There should be no inconsistency, hence the only logically consistent
conclusion is that the special case implementation was wrong - it cannot
give results inconsistent with the general code. Hence this commit changes
it to return 0 (with a warning). This is achieved by simply skipping the
special case code, if there are insufficient arguments.