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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also see PR37560:
Why do you think the type should be int instead of int:1?  The conclusion 
from C90 DRs was that bit-fields have their own types, and from C99 DRs 
was to leave whether they have their own types implementation-defined, and 
GCC follows the C90 DRs and so the assignment has type int:1 and is not 
promoted as an operand of sizeof.
--- CUT ---

Basically GCC is following C90 DRs (defect reports) here and is continuing to
follow it even in C99 (and later standards); even though those later standards
allow for different behavior.

Also note again C++ is different from C here.

Reply via email to