https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90885

            Bug ID: 90885
           Summary: GCC should warning about 2^16 and 2^32 and 2^64
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

GCC doesn't warn for:

short maxshort = 2^16;
int maxint = 2^32;
long maxlong = 2^64;

Sadly people actually do this:
https://twitter.com/jfbastien/status/1139298419988549632
https://twitter.com/mikemx7f/status/1139335901790625793

We probably want it for both C and C++.

Reply via email to