https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69138
Bug ID: 69138 Summary: Woverflow not triggered for constexpr within class Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: krzysztof.wesolowski at rainlabs dot pl Target Milestone: --- When i have following code: #include <stdint.h> static constexpr uint8_t small_global = 0xFFFFFFFF; class A { static constexpr uint8_t small_within_class = 0xFFFFFFFF; }; template<typename T> class B { static constexpr uint8_t small_within_templated_class = 0xFFFFFFFF; }; B<int> b; It only produces warnings for first two cases. Online compiler with test case: https://goo.gl/aGL0n4