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

--- Comment #29 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Sasha B from comment #28)
> You can disregard whether the underlying type is fixed or not. So, GCC
> should not give a warning unless a bitfield containing Foo really is too
> small to hold a given value of Foo, warning on the assignment makes sense.

I agree that we could warn on assignment instead. If the values assigned to the
bitfield are constant and known to fit, there's no need to warn. See PR 61414
for the same warning. I don't know if we need to keep both bugs open.

Reply via email to