Main Page | Report this Page
Computers Forum Index  »  Computer Compilers - LCC  »  LCC-Win32 labs bug...
Page 1 of 1    

LCC-Win32 labs bug...

Author Message
Jason Hood...
Posted: Sun Jun 28, 2009 4:21 am
Guest
There's a bug with labs - it just clears the sign bit.

C:\Language\lcc>lcc -v
Logiciels/Informatique lcc-win32 version 3.8. Compilation date: Jun 22
2009 18:05:34

C:\Language\lcc>type labs.c
#include <stdio.h>
#include <stdlib.h>

int main( void )
{
printf( "labs( -1 ) = %ld\n", labs( -1 ) );

return 0;
}

C:\Language\lcc>lc labs.c

C:\Language\lcc>labs
labs( -1 ) = 2147483647

Jason.
 
jacob navia...
Posted: Sun Jun 28, 2009 9:10 pm
Guest
Jason Hood wrote:
Quote:
There's a bug with labs - it just clears the sign bit.

C:\Language\lcc>lcc -v
Logiciels/Informatique lcc-win32 version 3.8. Compilation date: Jun 22
2009 18:05:34

C:\Language\lcc>type labs.c
#include <stdio.h
#include <stdlib.h

int main( void )
{
printf( "labs( -1 ) = %ld\n", labs( -1 ) );

return 0;
}

C:\Language\lcc>lc labs.c

C:\Language\lcc>labs
labs( -1 ) = 2147483647

Jason.

Fixed in the latest version.

Thanks for your help
 
 
Page 1 of 1    
All times are GMT
The time now is Wed Dec 02, 2009 9:52 pm