https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79366

--- Comment #6 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
FYI, the original problem was that libxml2 was unable to convert
a date value 1601-01-01T00:00:00.000+00:01 which should underflow
from 1601 to 1600, but we got the wrong date 1601-12-31T23:59:00.000 here
and that made one unit test fail.

libxml2-2.9.4 has this in xmlschemastypes.c

#define FQUOTIENT(a,b)                  (floor(((double)a/(double)b)))
#define FQUOTIENT_RANGE(a,low,high)     (FQUOTIENT((a-low),(high-low)))

long temp = 0;

        r->year = r->year + (unsigned int) FQUOTIENT_RANGE(temp, 1, 13);

r->year is a long with value 1601

Reply via email to