[Bug c++/71792] deducing type from bitfield leads to overflow

2018-10-08 Thread vrzubov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71792

--- Comment #3 from vadim  ---
Created attachment 44807
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44807&action=edit
test case

after patch current test have to work

[Bug c++/71792] New: deducing type from bitfield leads to overflow

2016-07-07 Thread vrzubov at gmail dot com
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