bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSK(OSS) compilation problem


From: Matthew Woehlke
Subject: Re: NSK(OSS) compilation problem
Date: Tue, 17 Oct 2006 10:05:43 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0

Paul Eggert wrote:
Matthew Woehlke <address@hidden> 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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]