First, Frank, thanks for the advice on using Initialize to work around my file problem - works a treat. Now I have bumped into a difference (I have an easy workaround for me real code but I thought people might be interested). Build and run the program below. program mgcd_program; var num : integer ; begin num := -2147483648 ; if num = 16#80000000 then writeln( 'equal' ) else writeln( 'not equal' ) end. When I build with Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs gpc version 2.1 (20020510), based on gcc-2.8.1 I get the output "equal". When I build with Reading specs from /ClearCase_01/mgcd/gcc-3.2.1_gpc-20021128_install.dir/lib/gcc-lib/sparc-sun- solaris2.6/3.2.1/specs Configured with: /ClearCase_01/mgcd/gcc-3.2.1/configure --prefix=/ClearCase_01/mgcd/gcc-3.2.1 _gpc-20021128_install.dir Thread model: posix gpc version 20021128, based on gcc-3.2.1 I get the output "not equal". The C program:- main() { int num = -2147483647 - 1 ; if ( num == 0x80000000 ) printf( "equal\n" ) ; else printf( "not equal\n" ) ; } always returns "equal". Anyway, clearly there is an inconsistency between the GPC versions. Cheers, Martin G C Davies
participants (3)
-
Frank Heckenbach -
Martin G C Davies -
Prof. A Olowofoyeku (The African Chief)