Paul Eggert wrote:
Matthew Woehlke <[EMAIL PROTECTED]> writes:
Notice that it looks like the result of 'x>>y' under certain
circumstances is '0x100000000 | (x & 0xFFFFFFFF)', regardless of the
value of 'y'... which is of course Just Plain Wrong.
That's what we're looking for. Ideally, I'd like a sample program
that fails to _compile_ due to the problem. But I guess we'd settle
for one that fails to _run_.
1288 27a1ad6e467a7e63>>? == 1467a7e63 ?
OK, what happens if you compile and run the following program, with
and without -O? What is the exit status of the program? If it works,
then we don't yet have a complete handle on the problem.
#define BIG 0x27a1ad6e467a7e63LL
#define HALF_BIG 0x13d0d6b7233d3f31LL
#if BIG >> 1 != HALF_BIG
error;
#endif
int array[BIG >> 1 == HALF_BIG ? 1 : -1];
long long int big = BIG;
int main (void) { return big >> 1 != HALF_BIG; }
Nope, no luck, '0' in both cases, and adding a printf confirms the
correct values.
--
Matthew
Don't use a hippo to... what was I saying?
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils