Okay, I must be losing my mind. Does anyone know why the following program compiled with stock gcc-3.2.1, stock CFLAGS, and no CPUTYPE produces:
ddy.quot = 1 ddy.rem = -1077937744 on -CURRENT, and: ddy.quot = 8 ddy.rem = 0 On -stable? #include <stdlib.h> #include <stdio.h> main(void) { div_t ddy; int dy, dy_frac; ddy = div (768, 96); dy = ddy.quot; dy_frac = ddy.rem; printf("ddy.quot = %d\n", dy); printf("ddy.rem = %d\n", dy_frac); return 0; } > cc -O -pipe -o xxx xxx.c I'm doing something wrong, right? I mean, this can't be right. I've verified this now on a P4 running: FreeBSD jclarke-pc.cisco.com 5.0-RC FreeBSD 5.0-RC #0: Mon Dec 16 02:54:55 EST 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/JCLARKE-PC i386 And a PIII running: FreeBSD sysinfo.mezzweb.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Dec 16 09:44:28 CST 2002 [EMAIL PROTECTED]:/usr/src/sys/i386/compile/BSDROCKS i386 Both machines produce the same result, while my -stable machines produce the correct result. Both machines have fresh -CURRENT headers. Oh, and if I move the xxx binary from my -stable machine to my -CURRENT machine, it produces the correct result. Both machines have WITNESS and INVARIANTS disabled. The PIII has MATH_EMULATE compiled in, but the P4 does not. Any help would be most appreciated as I think this is causing Nautilus crashes on -CURRENT. Thanks. Joe -- PGP Key : http://www.marcuscom.com/pgp.asc
signature.asc
Description: This is a digitally signed message part