This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52661] negative maxint for long long gives warning
- From: "jmichae3 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Mar 2012 06:29:51 +0000
- Subject: [Bug c/52661] negative maxint for long long gives warning
- Auto-submitted: auto-generated
- References: <bug-52661-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52661
--- Comment #5 from Jim Michaels <jmichae3 at yahoo dot com> 2012-03-22 06:29:51 UTC ---
read my comments in the code.
-(2^(32-1)) is a valid constant for 32-bit signed integers. I don't get a
warning for that.
-(2^(16-1)) is a valid constant for 16-bit signed integers. I don't get a
warning for that.
-(2^(8-1)) is a valid constant for 8-bit signed integers. I don't get a
warning for that.
but -(2^(64-1)) is a valid constant for 64-bit signed integers, and I get a
warning for that.
what for? what possible reason is there for that? these are valid integers!
everybody knows what the range of int64_t and long long are. but someone
goofed on this one.
looks to me like a bug.