This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hello.
I found a bug in EGCS-Mingw32 GCC
compiler version 1.1.1.
This compiler does not support correctly
64-bit integer(long long) in scanf/printf series function.
I've tested below program in my PII-300
with EGCS-Mingw32 compiler and SunSparc Enterprise 3000 with gcc compiler in
Unix 4.0.
This program is printing Mersenne
numbers. #include <stdio.h>
int main()
{ unsigned long long m=1; int i; for (i=1;i<65;i++) { printf("M%d = %llu\n",i,m); m<<=1; m++; } return 0; } Please compare below results
carefully.
The results of PII-300 with EGCS-Mingw32
compiler.
M1 = 1
M2 = 3 M3 = 7 M4 = 15 M5 = 31 M6 = 63 M7 = 127 M8 = 255 M9 = 511 M10 = 1023 M11 = 2047 M12 = 4095 M13 = 8191 M14 = 16383 M15 = 32767 M16 = 65535 M17 = 131071 M18 = 262143 M19 = 524287 M20 = 1048575 M21 = 2097151 M22 = 4194303 M23 = 8388607 M24 = 16777215 M25 = 33554431 M26 = 67108863 M27 = 134217727 M28 = 268435455 M29 = 536870911 M30 = 1073741823 M31 = 2147483647 M32 = 4294967295 M33 = 4294967295 M34 = 4294967295 M35 = 4294967295 M36 = 4294967295 M37 = 4294967295 M38 = 4294967295 M39 = 4294967295 M40 = 4294967295 M41 = 4294967295 M42 = 4294967295 M43 = 4294967295 M44 = 4294967295 M45 = 4294967295 M46 = 4294967295 M47 = 4294967295 M48 = 4294967295 M49 = 4294967295 M50 = 4294967295 M51 = 4294967295 M52 = 4294967295 M53 = 4294967295 M54 = 4294967295 M55 = 4294967295 M56 = 4294967295 M57 = 4294967295 M58 = 4294967295 M59 = 4294967295 M60 = 4294967295 M61 = 4294967295 M62 = 4294967295 M63 = 4294967295 M64 = 4294967295 The results of SunSparc Enterprise 3000
with Unix 4.0.
M1 = 1
M2 = 3 M3 = 7 M4 = 15 M5 = 31 M6 = 63 M7 = 127 M8 = 255 M9 = 511 M10 = 1023 M11 = 2047 M12 = 4095 M13 = 8191 M14 = 16383 M15 = 32767 M16 = 65535 M17 = 131071 M18 = 262143 M19 = 524287 M20 = 1048575 M21 = 2097151 M22 = 4194303 M23 = 8388607 M24 = 16777215 M25 = 33554431 M26 = 67108863 M27 = 134217727 M28 = 268435455 M29 = 536870911 M30 = 1073741823 M31 = 2147483647 M32 = 4294967295 M33 = 8589934591 M34 = 17179869183 M35 = 34359738367 M36 = 68719476735 M37 = 137438953471 M38 = 274877906943 M39 = 549755813887 M40 = 1099511627775 M41 = 2199023255551 M42 = 4398046511103 M43 = 8796093022207 M44 = 17592186044415 M45 = 35184372088831 M46 = 70368744177663 M47 = 140737488355327 M48 = 281474976710655 M49 = 562949953421311 M50 = 1125899906842623 M51 = 2251799813685247 M52 = 4503599627370495 M53 = 9007199254740991 M54 = 18014398509481983 M55 = 36028797018963967 M56 = 72057594037927935 M57 = 144115188075855871 M58 = 288230376151711743 M59 = 576460752303423487 M60 = 1152921504606846975 M61 = 2305843009213693951 M62 = 4611686018427387903 M63 = 9223372036854775807 M64 = 18446744073709551615 EGCS-Ming32 compiler does not return correct results.
Please correct that bug next version.
Jo Yeong Uk. |
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |