https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77299
Bug ID: 77299 Summary: No warning for unused "INT64_MAX" and similar constants Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wipedout at yandex dot ru Target Milestone: --- On http://gcc.godbolt.org/ I select gcc 6.1 and specify -O3 -Wall The code is: #include <stdint.h> int main() { INT64_MIN; // no warning INT64_MIN; // no warning INT64_MAX; // -Wunused-value INT64_MAX; // -Wunused-value 1; // -Wunused-value 0; // -Wunused-value INT64_MIN + 0; // -Wunused-value } For some reason there's no warning where unused INT64_MIN occurs.