On Fri, 19 Feb 2016, Wink Saville wrote: > And I've tried to use _Generic to print the type of a bit field but > the compiler fails with:
Indeed, bit-field types cannot match any type name, only default. The only conversions applied to the controlling expression are those involved in lvalue to rvalue conversion (at least, that's what's currently implemented, and is the current direction on DR#481). In particular, the integer promotions (which would convert this bit-field to int) are not applied. You can of course use unary + (or various other constructs depending on the set of possible types) to cause some promotions. -- Joseph S. Myers jos...@codesourcery.com