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]
Other format: [Raw text]

[Bug c/52661] negative maxint for long long gives warning


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52661

--- Comment #15 from Jim Michaels <jmichae3 at yahoo dot com> 2012-03-22 21:54:16 UTC ---
oops, made amistake there.

if (-1==sign && 9223372036854775808==mantissa) {
    datum=mantissa*sign;
} else if (1==sign && 9223372036854775808==mantissa) {
    datum=mantissa;
} else if (-1==sign && mantissa > 9223372036854775808) {
    printf("error:....\n");
} else if (1==sign && mantissa > 9223372036854775808) {
    printf("error:....\n");
} else {
    datum=sign*mantissa;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]