http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242



--- Comment #21 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-26 
13:27:45 UTC ---

Uhm, actually, when the underlying type is unscoped and we already accept the

code, we warn exactly in the same way. I'm not sure if this is already clear to

everybody, definitely wasn't clear to me, sorry if I misled you Jon or somebody

else into thinking that the possible issues having to do with -Wnarrowing were

important for this issue, I understand now they are not:



enum MyEnum { A1 = 1, A2 = 2 };



struct MyClass

{

  MyEnum Field1 : 1;

};



Thus, it really seems the fix for this issue boils down to loosening the check

in grokbitfield and that's it.

Reply via email to