https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71792
Bug ID: 71792 Summary: deducing type from bitfield leads to overflow Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vrzubov at gmail dot com Target Milestone: --- Created attachment 38846 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38846&action=edit whole example, compiles with --std=c++11 class some_class { public: unsigned int nc0 : 1; }; some_class sm; // gives infinity cycle due to overflow of nc0:1 , in template case; for (auto i = sm.nc0; i < 10; i++) whole example is attached check with --std=c++11, in g++4.8, g++4.9, g++5, g++6