On 2005–08–01, at 17:45, Steve Peters wrote:
Automated smoke report for 5.9.3 patch 25248
mccoy.peters.homeunix.org: Intel Pentium III ("GenuineIntel" 686-
class, 512KB L2 cache) (548 MHz) (i386/1 cpu)
on openbsd - 3.7
using cc version 3.3.5 (propolice)
...
It appears that the additional sprintf.t test is causing failures
on OpenBSD.
ok 142
ok 143
ok 144
ok 145
ok 146
not ok 147 >%.0g< >-0.0< >-0< >0< # No minus
ok 148
ok 149
ok 150
ok 151
3.7 is the latest openbsd, isn't it? Presumably gcc 3.3.5 is the
default C compiler for this version. Can you say how the tests look
if you use gcc 4.0 instead of 3.3.5?
If gcc 4.0 does not fix the problem, and if it is reasonable to
expect most people to build perl for openbsd 3.7 using gcc 3.3.5, can
you cook up and test a patch for the relevant line of sprintf.t, such
that openbsd is added to the skip list? If you feel optimistic about
a fix appearing in the next release of openbsd, limit the skip to
v3.7 and earlier; otherwise skip for all versions.
As I think this is a divergence from the C standard*, can you report
it as a bug to the openbsd people? My (cursory) search of their
problem reports does not turn up anything that looks close to this
issue. The following test program should output "-0". Well, it does
for me on Mac OS X, anyway:
#include <math.h>
#include <stdio.h>
main(){printf("%g\n", -pow(10, -200) * pow(10, -200));}
(Identity cribbed from <http://www.savrola.com/resources/
negative_zero.html>.)
Thanks for your help.
* "The results of all floating conversions of a negative zero, and of
negative values that round to zero, include a minus sign." --
footnote in section 7.19.6.1, sprintf, of ISO 9899:1999 --
Programming Language C.
--
Dominic Dunlop