This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/82241] New: invalid warning on valid int64_t value -9223372036854775808
- From: "alexander.sizov at arpanet dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Sep 2017 01:00:31 +0000
- Subject: [Bug c/82241] New: invalid warning on valid int64_t value -9223372036854775808
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82241
Bug ID: 82241
Summary: invalid warning on valid int64_t value
-9223372036854775808
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: alexander.sizov at arpanet dot ru
Target Milestone: ---
hi!
valid range for type signed int64_t is [-9223372036854775808,
9223372036854775807]. but when i try to create constant with value
INT64_C(-9223372036854775808) gcc warns: "warning: integer constant is so large
that it is unsigned".
in other words:
INT64_MIN == -9223372036854775808
std::numeric_limits<int64_t>::min() == -9223372036854775808
auto i = INT64_C(-9223372036854775808) - is gcc warning - it's wrong.
thanks!
(sorry for my english).