Issue 789294: Solaris Forte 7 &8 bug in test_long (original) (raw)

Python 2.2.3

This is for information. It is a bug in Sun's Forte 7 and 8 compiler suite, very unlikely to affect most people, and I am pursuing it at low priority with Sun. I am reporting it as it will cause the tests to fail if anyone switches floating-point trapping on.

In PyFloat_FromString in floatobject.c, there is a call to strtod. In test_long, this is supplied with a huge argument. Sun have misunderstood C99 (puke) to state that the wording in Annex F requires strtod to raise an exception if it overflows, and have again misunderstood C99 to mean that implies SIGFPE if trapping is on. I don't blame them for getting confused, but their interpretation is wrong - or, at least that what was stated when C99 was in draft!

Generically, we can expect to see more vendors get confused by C99, and especially by the horrible floating-point changes.

Yuck.