Main Page | Report this Page
Computers Forum Index  »  Computer Compilers - LCC  »  Bug report - incorrect sign when using long long...
Page 1 of 1    

Bug report - incorrect sign when using long long...

Author Message
Colin Barker...
Posted: Sun Jun 21, 2009 4:59 pm
Guest
I reported a bug for this program some time ago. The value printed for x was
incorrect. With the version of lcc-win32 that I downloaded yesterday, the
absolute values of x and t-4b are now both correct, but they are both
incorrectly considered to be negative!

#include <stdio.h>
int main(void)
{
long long t=15528312597606, b=1762289, x;
x=t-4*b;
(void)printf("x=%lld t-4b=%lld\n", x, t-4*b);
return 1;
}

--
Colin
 
jacob navia...
Posted: Tue Jun 23, 2009 12:42 am
Guest
Colin Barker wrote:
Quote:
I reported a bug for this program some time ago. The value printed for x
was incorrect. With the version of lcc-win32 that I downloaded
yesterday, the absolute values of x and t-4b are now both correct, but
they are both incorrectly considered to be negative!

#include <stdio.h
int main(void)
{
long long t=15528312597606, b=1762289, x;
x=t-4*b;
(void)printf("x=%lld t-4b=%lld\n", x, t-4*b);
return 1;
}

--
Colin


This is HIGHLY embarrassing :-(

Please download again. I fixed this on Sunday

jacob
 
CBFalconer...
Posted: Tue Jun 23, 2009 3:30 am
Guest
jacob navia wrote:
Quote:
Colin Barker wrote:

I reported a bug for this program some time ago. The value
printed for x was incorrect. With the version of lcc-win32 that
I downloaded yesterday, the absolute values of x and t-4b are
now both correct, but they are both incorrectly considered to
be negative!

#include <stdio.h
int main(void) {
long long t=15528312597606, b=1762289, x;
x=t-4*b;
(void)printf("x=%lld t-4b=%lld\n", x, t-4*b);
return 1;
}

This is HIGHLY embarrassing :-(

Please download again. I fixed this on Sunday

Maintenance of your release testing program will avoid these
problems.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
 
 
Page 1 of 1    
All times are GMT
The time now is Mon Nov 30, 2009 8:32 am