------- Comment #3 from mmitchel at gcc dot gnu dot org 2006-04-23 22:13 ------- I agree that the C++ standard requires the behavior suggested by Joseph in Comment #1.
However, my patch was not intended to fix this bug, and only does so by accident. In particular, the last lines of decay_conversion convert the expression to the TYPE_MAIN_VARIANT of the limited-precision type, rather than to the TYPE_MAIN_VARIANT of the declared type of the bitfield, as I had intended, although the original conversion from limited-precision type to declared type is present in the expression by this point. I am not sure if that original conversion is actually required, given that the testsuite is passing with the code in its current state. In earlier forms of the patch, it was definitely required; otherwise, for example, bitfields of enumeration type did not have the correct type elsewhere in the compiler. It may be that because of the changes I made to the conversion machinery in call.c, this is no longer a problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16376