https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94058

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |84516

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What is interesting is clang also reject this for the same reason.
Also this is related to PR 84516.

Then again this might be invalid based on [conv.prom] (I don't know if this
wording has changed in recent C++ versions though):


> A prvalue for an integral bit-field (10.3.10) can be converted to a prvalue 
> of type int if int can represent all the values of the bit-field; otherwise, 
> it can be converted to unsigned int if unsigned int can represent all the 
> values of the bit-field. If the bit-field is larger yet, no integral 
> promotion applies to it.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84516
[Bug 84516] bitfield temporaries > 32-bits have wrong type

Reply via email to